Skip to content

Commit 5522ab5

Browse files
authored
fix get_fee_estimate assertion (#20211)
fix get_fee_estimate
1 parent 03cc2fa commit 5522ab5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

chia/full_node/full_node_rpc_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ async def get_fee_estimate(self, request: dict[str, Any]) -> dict[str, Any]:
998998

999999
if peak is None:
10001000
peak_height = uint32(0)
1001-
last_peak_timestamp = uint64(0)
1001+
last_peak_timestamp: Optional[uint64] = uint64(0)
10021002
last_block_cost = 0
10031003
fee_rate_last_block = 0.0
10041004
last_tx_block_fees = uint64(0)
@@ -1011,7 +1011,6 @@ async def get_fee_estimate(self, request: dict[str, Any]) -> dict[str, Any]:
10111011
while last_tx_block is None or last_peak_timestamp is None:
10121012
peak_with_timestamp -= 1
10131013
last_tx_block = self.service.blockchain.height_to_block_record(peak_with_timestamp)
1014-
assert last_tx_block.timestamp is not None # mypy
10151014
last_peak_timestamp = last_tx_block.timestamp
10161015

10171016
assert last_tx_block is not None # mypy

0 commit comments

Comments
 (0)