(self)
| 253 | node.submitheader(hexdata=CBlockHeader(bad_block).serialize().hex()) |
| 254 | |
| 255 | def test_pruning(self): |
| 256 | self.log.info("Test that submitblock stores previously pruned block") |
| 257 | prune_node = self.nodes[2] |
| 258 | self.generate(prune_node, 400, sync_fun=self.no_op) |
| 259 | pruned_block = prune_node.getblock(prune_node.getblockhash(2), verbosity=0) |
| 260 | pruned_height = prune_node.pruneblockchain(400) |
| 261 | assert_greater_than_or_equal(pruned_height, 2) |
| 262 | pruned_blockhash = prune_node.getblockhash(2) |
| 263 | |
| 264 | assert_raises_rpc_error(-1, 'Block not available (pruned data)', prune_node.getblock, pruned_blockhash) |
| 265 | |
| 266 | result = prune_node.submitblock(pruned_block) |
| 267 | assert_equal(result, "inconclusive") |
| 268 | assert_equal(prune_node.getblock(pruned_blockhash, verbosity=0), pruned_block) |
| 269 | |
| 270 | |
| 271 | def send_transactions(self, utxos, fee_rate, target_vsize): |
no test coverage detected