Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: always take gas price from previous block (#9638)
Part of #9618. In post-state-root, chunk production is moved before block production, thus we don't have a `Block` during applying chunk anymore. We need to make sure that all necessary data is still propagated to `Runtime::apply`. It should've not have been an error for gas price, as it is taken from previous block in the general case: https://github.com/near/nearcore/blob/9c8d0bbec6a71876bb3317db2ade425f0077a184/chain/chain/src/chain.rs#L4120 However, when there is no chunk, there seem to be a very old error - it is taken from the same block. Luckily, after `ProtocolFeature::FixApplyChunks` it is not an issue: when there is no chunk, gas price is not used at all. So I just start taking it from previous block for consistency, to ensure that in post-state-root current block can be safely removed. Full context: https://near.zulipchat.com/#narrow/stream/295302-general/topic/.E2.9C.94.20gas.20price.20inconsistency/near/394894144 ## Testing As the change must be no-op, existing tests are enough.
- Loading branch information