def test_simple_bumpfee_succeeds(rbf_node, peer_node, dest_address):
    rbfid = create_fund_sign_send(rbf_node, {dest_address: 0.09})
    rbftx = rbf_node.gettransaction(rbfid)
    sync_mempools((rbf_node, peer_node))
    assert ((rbfid in rbf_node.getrawmempool()) and (rbfid in peer_node.getrawmempool()))
    bumped_tx = rbf_node.bumpfee(rbfid)
    assert ((bumped_tx['fee'] - abs(rbftx['fee'])) > 0)
    sync_mempools((rbf_node, peer_node))
    assert (bumped_tx['txid'] in rbf_node.getrawmempool())
    assert (bumped_tx['txid'] in peer_node.getrawmempool())
    assert (rbfid not in rbf_node.getrawmempool())
    assert (rbfid not in peer_node.getrawmempool())
    oldwtx = rbf_node.gettransaction(rbfid)
    assert (len(oldwtx['walletconflicts']) > 0)
    bumpedwtx = rbf_node.gettransaction(bumped_tx['txid'])
    assert_equal(oldwtx['replaced_by_txid'], bumped_tx['txid'])
    assert_equal(bumpedwtx['replaces_txid'], rbfid)
def test_simple_bumpfee_succeeds(rbf_node, peer_node, dest_address):
    rbfid = create_fund_sign_send(rbf_node, {dest_address: 0.09})
    rbftx = rbf_node.gettransaction(rbfid)
    sync_mempools((rbf_node, peer_node))
    assert ((rbfid in rbf_node.getrawmempool()) and (rbfid in peer_node.getrawmempool()))
    bumped_tx = rbf_node.bumpfee(rbfid)
    assert ((bumped_tx['fee'] - abs(rbftx['fee'])) > 0)
    sync_mempools((rbf_node, peer_node))
    assert (bumped_tx['txid'] in rbf_node.getrawmempool())
    assert (bumped_tx['txid'] in peer_node.getrawmempool())
    assert (rbfid not in rbf_node.getrawmempool())
    assert (rbfid not in peer_node.getrawmempool())
    oldwtx = rbf_node.gettransaction(rbfid)
    assert (len(oldwtx['walletconflicts']) > 0)
    bumpedwtx = rbf_node.gettransaction(bumped_tx['txid'])
    assert_equal(oldwtx['replaced_by_txid'], bumped_tx['txid'])
    assert_equal(bumpedwtx['replaces_txid'], rbfid)