Skip to content

Commit bcad1cf

Browse files
authored
Merge pull request #50 from tomaka/close-46
Make `chainHead_unstable_unpin` accept multiple block hashes at once
2 parents af1415b + e7c1798 commit bcad1cf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/api/chainHead_unstable_unpin.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**Parameters**:
44

55
- `followSubscription`: An opaque string that was returned by `chainHead_unstable_follow`.
6-
- `hash`: String containing the hexadecimal-encoded hash of the header of the block to unpin.
6+
- `hash`: String or array of strings containing the hexadecimal-encoded hash of the header of the block to unpin.
77

88
**Return value**: *null*
99

@@ -13,8 +13,10 @@ On-going calls to `chainHead_unstable_body`, `chainHead_unstable_call` and `chai
1313

1414
Has no effect if the `followSubscription` is invalid or stale.
1515

16+
If this function returns an error, then no block must have been unpinned. Implementations are expected to start unpinning the blocks only after it has made sure that all the blocks could be unpinned.
17+
1618
## Possible errors
1719

18-
- A JSON-RPC error is generated if the `followSubscription` is valid but the block hash passed as parameter doesn't correspond to any block that has been reported by `chainHead_unstable_follow`.
19-
- A JSON-RPC error is generated if the `followSubscription` is valid but the block hash passed as parameter has already been unpinned.
20+
- A JSON-RPC error is generated if the `followSubscription` is valid but at least one of the block hashes passed as parameter doesn't correspond to any block that has been reported by `chainHead_unstable_follow`.
21+
- A JSON-RPC error is generated if the `followSubscription` is valid but at least one of the the block hashes passed as parameter has already been unpinned.
2022
- No error is generated if the `followSubscription` is invalid or stale. The call is simply ignored.

0 commit comments

Comments
 (0)