fix: calculate parity of legacy EIP155 txs correctly in alloy compat (#8302)

This commit is contained in:
Brecht Devos
2024-05-19 11:57:44 +02:00
committed by GitHub
parent e45496a2a4
commit bcfa5780e8

View File

@ -28,7 +28,7 @@ impl TryFrom<alloy_rpc_types::Block> for Block {
s: signature.s,
odd_y_parity: signature
.y_parity
.unwrap_or(alloy_rpc_types::Parity(false))
.unwrap_or_else(|| alloy_rpc_types::Parity(!signature.v.bit(0)))
.0,
},
))