Nonce accounts must be writeable (#21260)

* Nonce accounts must be writeable

* feedback

* feedback
This commit is contained in:
Jack May
2021-11-16 15:01:00 -08:00
committed by GitHub
parent 8e0068ca6a
commit cb0bb5bd1e
7 changed files with 194 additions and 43 deletions

View File

@ -56,7 +56,7 @@ use {
epoch_info::EpochInfo,
epoch_schedule::EpochSchedule,
exit::Exit,
feature_set,
feature_set::{self, nonce_must_be_writable},
fee_calculator::FeeCalculator,
hash::Hash,
message::{Message, SanitizedMessage},
@ -3396,7 +3396,11 @@ pub mod rpc_full {
.unwrap_or(0);
let durable_nonce_info = transaction
.get_durable_nonce()
.get_durable_nonce(
preflight_bank
.feature_set
.is_active(&nonce_must_be_writable::id()),
)
.map(|&pubkey| (pubkey, *transaction.message().recent_blockhash()));
if durable_nonce_info.is_some() {
// While it uses a defined constant, this last_valid_block_height value is chosen arbitrarily.