Browse Source
master3d0f2d6fd7fix: randomize fallback transaction fee (theborakompanioni) Pull request description: Resolves #1363 Before this PR, if no fee estimate could be sourced, the fallback fee was always 10_000 sats/kilo-vbyte: ``` Before: 2022-10-11 05:45:19,429 [DEBUG] rpc: getmempoolinfo None 2022-10-11 05:45:19,432 [DEBUG] rpc: estimatesmartfee [3] 2022-10-11 05:45:19,438 [WARNING] Could not source a fee estimate from Core, falling back to default: 10000 sat/vkB (10.0 sat/vB). 2022-10-11 05:45:19,439 [INFO] Using bitcoin network feerate for 3 block confirmation target (randomized for privacy): 10000 sat/vkB (10.0 sat/vB) 2022-10-11 05:45:19,444 [DEBUG] rpc: getmempoolinfo None 2022-10-11 05:45:19,446 [DEBUG] rpc: estimatesmartfee [3] 2022-10-11 05:45:19,452 [WARNING] Could not source a fee estimate from Core, falling back to default: 10000 sat/vkB (10.0 sat/vB). 2022-10-11 05:45:19,453 [INFO] Using bitcoin network feerate for 3 block confirmation target (randomized for privacy): 10000 sat/vkB (10.0 sat/vB) 2022-10-11 05:45:19,488 [INFO] Using a fee of: 0.00001420 BTC (1420 sat). ``` After this PR, the fallback fee will take into account the value of `tx_fees_factor` to randomize the value (if `tx_fees_factor` is greater than zero): ``` 2022-10-11 05:51:00,112 [DEBUG] rpc: getmempoolinfo None 2022-10-11 05:51:00,114 [DEBUG] rpc: estimatesmartfee [3] 2022-10-11 05:51:00,119 [WARNING] Could not source a fee estimate from Core, falling back to default: 10000 sat/vkB (10.0 sat/vB). 2022-10-11 05:51:00,120 [INFO] Using bitcoin network feerate for 3 block confirmation target (randomized for privacy): 9962 sat/vkB (9.9 sat/vB) 2022-10-11 05:51:00,123 [DEBUG] rpc: getmempoolinfo None 2022-10-11 05:51:00,126 [DEBUG] rpc: estimatesmartfee [3] 2022-10-11 05:51:00,133 [WARNING] Could not source a fee estimate from Core, falling back to default: 10000 sat/vkB (10.0 sat/vB). 2022-10-11 05:51:00,134 [INFO] Using bitcoin network feerate for 3 block confirmation target (randomized for privacy): 10898 sat/vkB (10.8 sat/vB) 2022-10-11 05:51:00,156 [INFO] Using a fee of: 0.00001547 BTC (1547 sat). ``` Additionally, `fx_fees_factor` will be used to calculate `mempoolminfee_in_sat_randomized` instead of using a hardcoded max value of `1.2` (20%). If this is not wanted or you think this is a mistake, the second commit can be reverted in order to only apply the behaviour described above. ACKs for top commit: kristapsk: ACK3d0f2d6fd7Tree-SHA512: d950532e0abe9558b067b2b764f0c43b8a20f27c7c2223600ee461174124a21ec05c2d304ace2006d461d0ff0ae504ba246676a509240eea6d86fe975898a2f7
1 changed files with 8 additions and 5 deletions
Loading…
Reference in new issue