|
|
@ -71,7 +71,7 @@ class WalletTest (BitcoinTestFramework): |
|
|
|
unspent_0 = self.nodes[2].listunspent()[0] |
|
|
|
unspent_0 = self.nodes[2].listunspent()[0] |
|
|
|
unspent_0 = {"txid": unspent_0["txid"], "vout": unspent_0["vout"]} |
|
|
|
unspent_0 = {"txid": unspent_0["txid"], "vout": unspent_0["vout"]} |
|
|
|
self.nodes[2].lockunspent(False, [unspent_0]) |
|
|
|
self.nodes[2].lockunspent(False, [unspent_0]) |
|
|
|
assert_raises(JSONRPCException, self.nodes[2].sendtoaddress, self.nodes[2].getnewaddress(), 20) |
|
|
|
assert_raises_message(JSONRPCException, "Insufficient funds", self.nodes[2].sendtoaddress, self.nodes[2].getnewaddress(), 20) |
|
|
|
assert_equal([unspent_0], self.nodes[2].listlockunspent()) |
|
|
|
assert_equal([unspent_0], self.nodes[2].listlockunspent()) |
|
|
|
self.nodes[2].lockunspent(True, [unspent_0]) |
|
|
|
self.nodes[2].lockunspent(True, [unspent_0]) |
|
|
|
assert_equal(len(self.nodes[2].listlockunspent()), 0) |
|
|
|
assert_equal(len(self.nodes[2].listlockunspent()), 0) |
|
|
|