fix simple_config.estimate_fee
This commit is contained in:
@@ -40,11 +40,11 @@ def estimate_fee(tx_size_bytes: int) -> int:
|
|||||||
fee = SimpleConfig.estimate_fee_for_feerate(fee_per_kb, tx_size_bytes)
|
fee = SimpleConfig.estimate_fee_for_feerate(fee_per_kb, tx_size_bytes)
|
||||||
return fee
|
return fee
|
||||||
|
|
||||||
global config
|
global _INSTANCE
|
||||||
if not config:
|
if not _INSTANCE:
|
||||||
return use_fallback_feerate()
|
return use_fallback_feerate()
|
||||||
try:
|
try:
|
||||||
return config.estimate_fee(tx_size_bytes)
|
return _INSTANCE.estimate_fee(tx_size_bytes)
|
||||||
except NoDynamicFeeEstimates:
|
except NoDynamicFeeEstimates:
|
||||||
return use_fallback_feerate()
|
return use_fallback_feerate()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user