mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
rename SkipNonceChecks
This commit is contained in:
parent
36c87a220e
commit
d8f224552c
3 changed files with 7 additions and 7 deletions
|
|
@ -101,7 +101,7 @@ func (p *statePrefetcher) Prefetch(block *types.Block, statedb *state.StateDB, c
|
||||||
return nil // Also invalid block, bail out
|
return nil // Also invalid block, bail out
|
||||||
}
|
}
|
||||||
// Disable the nonce check
|
// Disable the nonce check
|
||||||
msg.SkipNonceChecks = true
|
msg.SkipFromNonceCheck = true
|
||||||
|
|
||||||
stateCpy.SetTxContext(tx.Hash(), i)
|
stateCpy.SetTxContext(tx.Hash(), i)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,12 +157,12 @@ type Message struct {
|
||||||
BlobHashes []common.Hash
|
BlobHashes []common.Hash
|
||||||
SetCodeAuthorizations []types.SetCodeAuthorization
|
SetCodeAuthorizations []types.SetCodeAuthorization
|
||||||
|
|
||||||
// When SkipNonceChecks is true, the message nonce is not checked against the
|
// When SkipFromNonceCheck is true, the message nonce is not checked
|
||||||
// account nonce in state.
|
// against the account nonce in state.
|
||||||
//
|
//
|
||||||
// This field will be set to true for operations like RPC eth_call
|
// This field will be set to true for operations like RPC eth_call
|
||||||
// or the state prefetching.
|
// or the state prefetching.
|
||||||
SkipNonceChecks bool
|
SkipFromNonceCheck bool
|
||||||
|
|
||||||
// When SkipFromEOACheck is true, the message sender is not checked to be an EOA.
|
// When SkipFromEOACheck is true, the message sender is not checked to be an EOA.
|
||||||
SkipFromEOACheck bool
|
SkipFromEOACheck bool
|
||||||
|
|
@ -181,7 +181,7 @@ func TransactionToMessage(tx *types.Transaction, s types.Signer, baseFee *big.In
|
||||||
Data: tx.Data(),
|
Data: tx.Data(),
|
||||||
AccessList: tx.AccessList(),
|
AccessList: tx.AccessList(),
|
||||||
SetCodeAuthorizations: tx.SetCodeAuthorizations(),
|
SetCodeAuthorizations: tx.SetCodeAuthorizations(),
|
||||||
SkipNonceChecks: false,
|
SkipFromNonceCheck: false,
|
||||||
SkipFromEOACheck: false,
|
SkipFromEOACheck: false,
|
||||||
BlobHashes: tx.BlobHashes(),
|
BlobHashes: tx.BlobHashes(),
|
||||||
BlobGasFeeCap: tx.BlobGasFeeCap(),
|
BlobGasFeeCap: tx.BlobGasFeeCap(),
|
||||||
|
|
@ -306,7 +306,7 @@ func (st *stateTransition) buyGas() error {
|
||||||
func (st *stateTransition) preCheck() error {
|
func (st *stateTransition) preCheck() error {
|
||||||
// Only check transactions that are not fake
|
// Only check transactions that are not fake
|
||||||
msg := st.msg
|
msg := st.msg
|
||||||
if !msg.SkipNonceChecks {
|
if !msg.SkipFromNonceCheck {
|
||||||
// Make sure this transaction's nonce is correct.
|
// Make sure this transaction's nonce is correct.
|
||||||
stNonce := st.state.GetNonce(msg.From)
|
stNonce := st.state.GetNonce(msg.From)
|
||||||
if msgNonce := msg.Nonce; stNonce < msgNonce {
|
if msgNonce := msg.Nonce; stNonce < msgNonce {
|
||||||
|
|
|
||||||
|
|
@ -461,7 +461,7 @@ func (args *TransactionArgs) ToMessage(baseFee *big.Int, skipNonceCheck, skipEoA
|
||||||
BlobGasFeeCap: (*big.Int)(args.BlobFeeCap),
|
BlobGasFeeCap: (*big.Int)(args.BlobFeeCap),
|
||||||
BlobHashes: args.BlobHashes,
|
BlobHashes: args.BlobHashes,
|
||||||
SetCodeAuthorizations: args.AuthorizationList,
|
SetCodeAuthorizations: args.AuthorizationList,
|
||||||
SkipNonceChecks: skipNonceCheck,
|
SkipFromNonceCheck: skipNonceCheck,
|
||||||
SkipFromEOACheck: skipEoACheck,
|
SkipFromEOACheck: skipEoACheck,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue