helium / blockchain-core

Apache License 2.0
214 stars 85 forks source link

Honor blockchain_txn:block_delay() when using ledger_at #1487

Closed Vagabond closed 1 year ago

Vagabond commented 1 year ago

For some unknown reason, some nodes may have an older delayed ledger than the prescribed 50 blocks, this was leading to block disagreement when a transaction whose validity was bounded by ledger availability was included in a block and the validity needed a ledger 51+ blocks back.

This patch forces ledger_at to only ever return 50 blocks back, even if the lagging ledger is lagging further behind.