qtum
qtum copied to clipboard
Increasing in the number of blocks to include a transaction in the blockchain after 0.20.2 on regtest node
I ran 0.20.2 node in regtest mode. After 5000 blocks was generated I start 18 tests each with such scenario:
- Generate two addresses A and B
- Send money to address A using 'sendtoaddress', wait until transaction was included in chain
- Send money from address A to address B using 'sendrawtransaction' and (for building transaction) 'estimatesmartfee 10'
- Wait 10 blocks
- Check that last transaction was included
Main issue is that from test to test number of blocks needed for including transaction is increasing and at last tests transaction is not included in next 10 blocks after sending. I use 'estimatesmartfee 10', it returns higher value from test to test, but from some point raising fee according to smart estimation does not lead to transaction will be included in 10 blocks. This issue was occurred after updating node to 0.20.2, on 0.20.1 all tests have been passed.
Node configuration:
{ "addrindex": "1", "dnsseed": "0", "fallbackfee": "0.0002", "logevents": "1", "port": "12000", "regtest": "1", "reindex": "1", "rpcallowip": "0.0.0.0/0", "rpcbind": "****", "rpcpassword": "****", "rpcport": "12001", "rpcuser": "****", "server": "1", "txindex": "1", "upnp": "0", "wallet": "" }
estimatesmartfee
needs a number of transactions in recent blocks to produce a good estimate. Otherwise you should see an error "Insufficient data or no feerate found". It will not produce useful results on regtest or even testnet.
@JB395 I tried to send 20+ transactions in the beginning of each test if estimatesmartfee
returns error you mentioned, but it did not help anyway. Also as I said all tests were right with 0.20.1 regtest node. I really cant see what was changed that can lead to such changes in behavior.
I think the algo wants to see transactions across multiple blocks. Try 3 transactions for 10 consecutive blocks, then estimatesmartfee 10
on the 11th block.