make messagesSigned public

This commit is contained in:
Roman Storm 2018-04-17 14:31:24 -07:00
parent 3d184533e3
commit ea0915eb0e
3 changed files with 5 additions and 3 deletions

View File

@ -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)];
}

View File

@ -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)];
}

View File

@ -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]