|
|
|
@ -85,7 +85,7 @@ class RawTransactionsTest(BitcoinTestFramework):
@@ -85,7 +85,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|
|
|
|
address = self.nodes[0].getnewaddress() |
|
|
|
|
assert_raises_rpc_error(-3, "Expected type object", self.nodes[0].createrawtransaction, [], 'foo') |
|
|
|
|
assert_raises_rpc_error(-8, "Data must be hexadecimal string", self.nodes[0].createrawtransaction, [], {'data': 'foo'}) |
|
|
|
|
assert_raises_rpc_error(-5, "Invalid Kevacoin address", self.nodes[0].createrawtransaction, [], {'foo': 0}) |
|
|
|
|
assert_raises_rpc_error(-5, "Invalid kevacoin address", self.nodes[0].createrawtransaction, [], {'foo': 0}) |
|
|
|
|
assert_raises_rpc_error(-3, "Invalid amount", self.nodes[0].createrawtransaction, [], {address: 'foo'}) |
|
|
|
|
assert_raises_rpc_error(-3, "Amount out of range", self.nodes[0].createrawtransaction, [], {address: -1}) |
|
|
|
|
assert_raises_rpc_error(-8, "Invalid parameter, duplicated address: %s" % address, self.nodes[0].createrawtransaction, [], multidict([(address, 1), (address, 1)])) |
|
|
|
@ -263,7 +263,7 @@ class RawTransactionsTest(BitcoinTestFramework):
@@ -263,7 +263,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|
|
|
|
self.sync_all() |
|
|
|
|
self.nodes[0].generate(1) |
|
|
|
|
self.sync_all() |
|
|
|
|
assert_equal(self.nodes[0].getbalance(), bal+Decimal('50.00000000')+Decimal('2.19000000')) #block reward + tx |
|
|
|
|
assert_equal(self.nodes[0].getbalance(), bal+Decimal('500.00000000')+Decimal('2.19000000')) #block reward + tx |
|
|
|
|
|
|
|
|
|
# 2of2 test for combining transactions |
|
|
|
|
bal = self.nodes[2].getbalance() |
|
|
|
@ -312,7 +312,7 @@ class RawTransactionsTest(BitcoinTestFramework):
@@ -312,7 +312,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
|
|
|
|
self.sync_all() |
|
|
|
|
self.nodes[0].generate(1) |
|
|
|
|
self.sync_all() |
|
|
|
|
assert_equal(self.nodes[0].getbalance(), bal+Decimal('50.00000000')+Decimal('2.19000000')) #block reward + tx |
|
|
|
|
assert_equal(self.nodes[0].getbalance(), bal+Decimal('500.00000000')+Decimal('2.19000000')) #block reward + tx |
|
|
|
|
|
|
|
|
|
# decoderawtransaction tests |
|
|
|
|
# witness transaction |
|
|
|
|