Clearing up a comment about the prefix for signing (#8828)
This commit is contained in:
parent
af1088ef61
commit
986f485b3e
@ -237,7 +237,7 @@ pub fn fetch_gas_price_corpus(
|
|||||||
|
|
||||||
/// Returns a eth_sign-compatible hash of data to sign.
|
/// Returns a eth_sign-compatible hash of data to sign.
|
||||||
/// The data is prepended with special message to prevent
|
/// The data is prepended with special message to prevent
|
||||||
/// chosen-plaintext attacks.
|
/// malicious DApps from using the function to sign forged transactions.
|
||||||
pub fn eth_data_hash(mut data: Bytes) -> H256 {
|
pub fn eth_data_hash(mut data: Bytes) -> H256 {
|
||||||
let mut message_data =
|
let mut message_data =
|
||||||
format!("\x19Ethereum Signed Message:\n{}", data.len())
|
format!("\x19Ethereum Signed Message:\n{}", data.len())
|
||||||
|
Loading…
Reference in New Issue
Block a user