|
|
|
@ -51,8 +51,8 @@ class GetBlockFromPeerTest(BitcoinTestFramework):
|
|
|
|
|
|
|
|
|
|
self.log.info("Arguments must be valid")
|
|
|
|
|
assert_raises_rpc_error(-8, "hash must be of length 64 (not 4, for '1234')", self.nodes[0].getblockfrompeer, "1234", peer_0_peer_1_id)
|
|
|
|
|
assert_raises_rpc_error(-1, "JSON value is not a string as expected", self.nodes[0].getblockfrompeer, 1234, peer_0_peer_1_id)
|
|
|
|
|
assert_raises_rpc_error(-1, "JSON value is not an integer as expected", self.nodes[0].getblockfrompeer, short_tip, "0")
|
|
|
|
|
assert_raises_rpc_error(-3, "Expected type string, got number", self.nodes[0].getblockfrompeer, 1234, peer_0_peer_1_id)
|
|
|
|
|
assert_raises_rpc_error(-3, "Expected type number, got string", self.nodes[0].getblockfrompeer, short_tip, "0")
|
|
|
|
|
|
|
|
|
|
self.log.info("We must already have the header")
|
|
|
|
|
assert_raises_rpc_error(-1, "Block header missing", self.nodes[0].getblockfrompeer, "00" * 32, 0)
|
|
|
|
|