hijack secp256k1 enablement feature plumbing for libsecp256k1 upgrade
This commit is contained in:
committed by
mergify[bot]
parent
568660b402
commit
3a85b77bb5
@@ -359,7 +359,7 @@ pub trait EntrySlice {
|
||||
fn verify_and_hash_transactions(
|
||||
&self,
|
||||
skip_verification: bool,
|
||||
secp256k1_program_enabled: bool,
|
||||
libsecp256k1_0_5_upgrade_enabled: bool,
|
||||
verify_tx_signatures_len: bool,
|
||||
) -> Option<Vec<EntryType<'_>>>;
|
||||
}
|
||||
@@ -515,7 +515,7 @@ impl EntrySlice for [Entry] {
|
||||
fn verify_and_hash_transactions<'a>(
|
||||
&'a self,
|
||||
skip_verification: bool,
|
||||
secp256k1_program_enabled: bool,
|
||||
libsecp256k1_0_5_upgrade_enabled: bool,
|
||||
verify_tx_signatures_len: bool,
|
||||
) -> Option<Vec<EntryType<'a>>> {
|
||||
let verify_and_hash = |tx: &'a Transaction| -> Option<HashedTransaction<'a>> {
|
||||
@@ -524,10 +524,8 @@ impl EntrySlice for [Entry] {
|
||||
if size > PACKET_DATA_SIZE as u64 {
|
||||
return None;
|
||||
}
|
||||
if secp256k1_program_enabled {
|
||||
// Verify tx precompiles if secp256k1 program is enabled.
|
||||
tx.verify_precompiles().ok()?;
|
||||
}
|
||||
tx.verify_precompiles(libsecp256k1_0_5_upgrade_enabled)
|
||||
.ok()?;
|
||||
if verify_tx_signatures_len && !tx.verify_signatures_len() {
|
||||
return None;
|
||||
}
|
||||
|
Reference in New Issue
Block a user