jmcore.fee_policy
jmcore.fee_policy
Shared minimum miner-fee policy for CoinJoin participants.
Classes
MinimumFeeRateExceedsCapError
Bases: ValueError
Raised when a required minimum fee rate exceeds the configured cap.
Source code in jmcore/src/jmcore/fee_policy.py
43 44 45 46 47 48 49 | |
Attributes
fee_rate = fee_rate
instance-attribute
source = source
instance-attribute
Methods:
__init__(*, source: str, fee_rate: float) -> None
Source code in jmcore/src/jmcore/fee_policy.py
46 47 48 49 | |
Functions:
estimate_p2wpkh_vsize(num_inputs: int, num_outputs: int) -> int
Return the conservative P2WPKH virtual-size estimate used by CoinJoin.
Source code in jmcore/src/jmcore/fee_policy.py
52 53 54 | |
fee_rate_meets_minimum(fee: int, vsize: int, minimum_fee_rate: float) -> bool
Check whether an integer fee meets the exact minimum fee rate.
Source code in jmcore/src/jmcore/fee_policy.py
57 58 59 | |
format_low_fee_error(fee_rate: float, minimum_fee_rate: float) -> str
Return a human-readable !error with only the two fee-policy values.
Source code in jmcore/src/jmcore/fee_policy.py
18 19 20 21 22 23 | |
parse_low_fee_error(message: object) -> tuple[float, float] | None
Extract bounded numeric diagnostics without logging arbitrary peer text.
Accept the current and earlier decimal precision. Full matching excludes identifiers, terminal escapes, and extra lines from ordinary INFO logs.
Source code in jmcore/src/jmcore/fee_policy.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
resolve_min_fee_rate(backend: Any, *, static_floor: float, block_target: int, max_fee_rate: float) -> float
async
Resolve available fee floors, with zero disabling the static floor.
A block target of -1 skips estimation but still honors the local mempool minimum. With no positive source, return zero rather than inventing a floor.
Source code in jmcore/src/jmcore/fee_policy.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
validate_min_fee_block_target(value: int) -> int
Accept a confirmation target or -1 to disable the estimator floor.
Source code in jmcore/src/jmcore/fee_policy.py
72 73 74 75 76 77 78 79 80 | |