(self, rbf_node, peer_node, dest_address)
| 236 | |
| 237 | |
| 238 | def test_notmine_bumpfee_fails(self, rbf_node, peer_node, dest_address): |
| 239 | self.log.info('Test that it cannot bump fee if non-owned inputs are included') |
| 240 | # here, the rbftx has a peer_node coin and then adds a rbf_node input |
| 241 | # Note that this test depends upon the RPC code checking input ownership prior to change outputs |
| 242 | # (since it can't use fundrawtransaction, it lacks a proper change output) |
| 243 | fee = Decimal("0.001") |
| 244 | utxos = [node.listunspent(query_options={'minimumAmount': fee})[-1] for node in (rbf_node, peer_node)] |
| 245 | inputs = [{ |
| 246 | "txid": utxo["txid"], |
| 247 | "vout": utxo["vout"], |
| 248 | "address": utxo["address"], |
| 249 | "sequence": BIP125_SEQUENCE_NUMBER |
| 250 | } for utxo in utxos] |
| 251 | output_val = sum(utxo["amount"] for utxo in utxos) - fee |
| 252 | rawtx = rbf_node.createrawtransaction(inputs, [{dest_address: output_val}, {"fee": fee}]) |
| 253 | signedtx = rbf_node.signrawtransactionwithwallet(rawtx) |
| 254 | signedtx = peer_node.signrawtransactionwithwallet(signedtx["hex"]) |
| 255 | rbfid = rbf_node.sendrawtransaction(signedtx["hex"]) |
| 256 | assert_raises_rpc_error(-4, "Transaction contains inputs that don't belong to this wallet", |
| 257 | rbf_node.bumpfee, rbfid) |
| 258 | self.clear_mempool() |
| 259 | |
| 260 | |
| 261 | def test_bumpfee_with_descendant_fails(self, rbf_node, rbf_node_address, dest_address): |
no test coverage detected