Skip to content

Commit

Permalink
Merge branch 'v7-bugfixes' of github.com:1200wd/bitcoinlib into v7-bu…
Browse files Browse the repository at this point in the history
…gfixes
  • Loading branch information
Cryp Toon committed Jul 12, 2024
2 parents ff5ae18 + d41f0a5 commit 4213e7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2374,12 +2374,14 @@ def test_wallet_anti_fee_sniping(self):
block_height = Service(network='testnet', cache_uri='').blockcount()
self.assertAlmostEqual(t.locktime, block_height+1, delta=3)

w2 = wallet_create_or_open('antifeesnipingtestwallet2', network='testnet', anti_fee_sniping=True)
w2 = wallet_create_or_open('antifeesnipingtestwallet2', network='testnet', anti_fee_sniping=True,
db_uri=self.database_uri)
w2.utxo_add(w2.get_key().address, 1234567, os.urandom(32).hex(), 1)
t = w2.send_to('tb1qrjtz22q59e76mhumy0p586cqukatw5vcd0xvvz', 123456, locktime=1901070183)
self.assertEqual(t.locktime, 1901070183)

w3 = wallet_create_or_open('antifeesnipingtestwallet3', network='testnet', anti_fee_sniping=False)
w3 = wallet_create_or_open('antifeesnipingtestwallet3', network='testnet', anti_fee_sniping=False,
db_uri=self.database_uri)
w3.utxo_add(w3.get_key().address, 1234567, os.urandom(32).hex(), 1)
t = w3.send_to('tb1qrjtz22q59e76mhumy0p586cqukatw5vcd0xvvz', 123456)
self.assertEqual(t.locktime, 0)
Expand Down

0 comments on commit 4213e7b

Please sign in to comment.