bridge.sol: solium: fix errors ala: Avoid using 'sha3(...)'. Use --fix to replace it with 'keccak256(...)'
This commit is contained in:
parent
c917c95b40
commit
23a919f2ef
|
@ -56,7 +56,7 @@ library Signer {
|
||||||
|
|
||||||
function hash (bytes message) internal returns (bytes32) {
|
function hash (bytes message) internal returns (bytes32) {
|
||||||
bytes memory prefix = "\x19Ethereum Signed Message:\n";
|
bytes memory prefix = "\x19Ethereum Signed Message:\n";
|
||||||
return sha3(prefix, Utils.toString(message.length), message);
|
return keccak256(prefix, Utils.toString(message.length), message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ contract ForeignBridge {
|
||||||
/// mainnet transaction hash (bytes32) // to avoid transaction duplication
|
/// mainnet transaction hash (bytes32) // to avoid transaction duplication
|
||||||
function deposit (address recipient, uint value, bytes32 transactionHash) public onlyAuthority() {
|
function deposit (address recipient, uint value, bytes32 transactionHash) public onlyAuthority() {
|
||||||
// Protection from misbehaing authority
|
// Protection from misbehaing authority
|
||||||
var hash = sha3(recipient, value, transactionHash);
|
var hash = keccak256(recipient, value, transactionHash);
|
||||||
|
|
||||||
// Duplicated deposits
|
// Duplicated deposits
|
||||||
require(!deposits[hash].contains(msg.sender));
|
require(!deposits[hash].contains(msg.sender));
|
||||||
|
@ -262,7 +262,7 @@ contract ForeignBridge {
|
||||||
|
|
||||||
// Valid withdraw message must have 84 bytes
|
// Valid withdraw message must have 84 bytes
|
||||||
require(message.length == 84);
|
require(message.length == 84);
|
||||||
var hash = sha3(message);
|
var hash = keccak256(message);
|
||||||
|
|
||||||
// Duplicated signatures
|
// Duplicated signatures
|
||||||
require(!signatures[hash].signed.contains(msg.sender));
|
require(!signatures[hash].signed.contains(msg.sender));
|
||||||
|
|
Loading…
Reference in New Issue