make messagesSigned public
This commit is contained in:
parent
3d184533e3
commit
ea0915eb0e
|
@ -211,7 +211,7 @@ contract ForeignBridge is ERC677Receiver, Validatable {
|
|||
bytesStorage[keccak256("signatures", _hash)] = _signature;
|
||||
}
|
||||
|
||||
function messagesSigned(bytes32 _message) private view returns(bool) {
|
||||
function messagesSigned(bytes32 _message) public view returns(bool) {
|
||||
return boolStorage[keccak256("messagesSigned", _message)];
|
||||
}
|
||||
|
||||
|
|
|
@ -474,7 +474,7 @@ contract ForeignBridge is ERC677Receiver, Validatable {
|
|||
bytesStorage[keccak256("signatures", _hash)] = _signature;
|
||||
}
|
||||
|
||||
function messagesSigned(bytes32 _message) private view returns(bool) {
|
||||
function messagesSigned(bytes32 _message) public view returns(bool) {
|
||||
return boolStorage[keccak256("messagesSigned", _message)];
|
||||
}
|
||||
|
||||
|
|
|
@ -238,7 +238,9 @@ contract('ForeignBridge', async (accounts) => {
|
|||
const messageFromContract = await foreignBridgeWithTwoSigs.message(msgHashFromLog);
|
||||
signature.should.be.equal(signatureFromContract);
|
||||
messageFromContract.should.be.equal(messageFromContract);
|
||||
|
||||
const hashMsg = Web3Utils.soliditySha3(message);
|
||||
const hashSenderMsg = Web3Utils.soliditySha3(authorities[0], hashMsg)
|
||||
true.should.be.equal(await foreignBridgeWithTwoSigs.messagesSigned(hashSenderMsg));
|
||||
})
|
||||
it('when enough requiredSignatures are collected, CollectedSignatures event is emitted', async () => {
|
||||
var recipientAccount = accounts[8]
|
||||
|
|
Loading…
Reference in New Issue