diff options
author | MeshCollider <dobsonsa68@gmail.com> | 2018-01-27 20:10:56 +1300 |
---|---|---|
committer | MeshCollider <dobsonsa68@gmail.com> | 2018-01-30 11:36:25 +1300 |
commit | ee1112122932151cee06b28ef724e0726849391b (patch) | |
tree | a124dac2f863b4ac4f768cdceb8a83f7a6efd967 /test/functional/rpc_rawtransaction.py | |
parent | 2ae7cf8ef5be67e085abc1b1dc71bc44865a71b3 (diff) |
Add special error for genesis coinbase to gettransaction
Diffstat (limited to 'test/functional/rpc_rawtransaction.py')
-rwxr-xr-x | test/functional/rpc_rawtransaction.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/rpc_rawtransaction.py b/test/functional/rpc_rawtransaction.py index d39d86b310..c2ca7c70b8 100755 --- a/test/functional/rpc_rawtransaction.py +++ b/test/functional/rpc_rawtransaction.py @@ -59,6 +59,10 @@ class RawTransactionsTest(BitcoinTestFramework): self.nodes[0].generate(5) self.sync_all() + # Test getrawtransaction on genesis block coinbase returns an error + block = self.nodes[0].getblock(self.nodes[0].getblockhash(0)) + assert_raises_rpc_error(-5, "The genesis block coinbase is not considered an ordinary transaction", self.nodes[0].getrawtransaction, block['merkleroot']) + # Test `createrawtransaction` required parameters assert_raises_rpc_error(-1, "createrawtransaction", self.nodes[0].createrawtransaction) assert_raises_rpc_error(-1, "createrawtransaction", self.nodes[0].createrawtransaction, []) |