This repository was archived by the owner on Nov 25, 2025. It is now read-only.
Commit 33361ce
committed
Merge #151: Add 'submitblock' rpc call
86278c0 Add 'submitblock' RPC call. (Elias Rohrer)
Pull request description:
I added two methods to submit raw and hex-encoded blocks via RPC calls.
Submitting blocks works, as tested in regtest mode. However, in case of success it currently yields the `Result`:
```
Err(JsonRpc(Json(Error("invalid type: null, expected a string", line: 0, column: 0))))
```
I think this happens because `submitblock` returns `null` in case of success (see [BIP022](https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki)).
Any suggestions how I should handle that?
ACKs for top commit:
shesek:
ACK 86278c0. Would be great to have this in :)
Tree-SHA512: 7b8632fef5e829a8a9923adddeaf80e51c236dcd2963f147f7ca620aff00c0c1e84bdd2ffdf74263ece224c2e330774da5d070a674cf4c7e4235de5f25c6dd8a2 files changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1162 | 1162 | | |
1163 | 1163 | | |
1164 | 1164 | | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
1165 | 1186 | | |
1166 | 1187 | | |
1167 | 1188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
0 commit comments