aboutsummaryrefslogtreecommitdiffstats
path: root/test/contracts
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-05-23 21:39:26 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-06-25 23:17:18 +0800
commit86a720b96a45ce1b59ab1038e7bb465f9a566189 (patch)
tree7b609cdfc2912244a8063a34360b4150ef3a8c07 /test/contracts
parent23c414200570b8751bde3fbcb3a3f7105e9ad8f8 (diff)
downloaddexon-solidity-86a720b96a45ce1b59ab1038e7bb465f9a566189.tar.gz
dexon-solidity-86a720b96a45ce1b59ab1038e7bb465f9a566189.tar.zst
dexon-solidity-86a720b96a45ce1b59ab1038e7bb465f9a566189.zip
Adjust tests.
Diffstat (limited to 'test/contracts')
-rw-r--r--test/contracts/FixedFeeRegistrar.cpp4
-rw-r--r--test/contracts/Wallet.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/contracts/FixedFeeRegistrar.cpp b/test/contracts/FixedFeeRegistrar.cpp
index 1fd58403..e5812e2b 100644
--- a/test/contracts/FixedFeeRegistrar.cpp
+++ b/test/contracts/FixedFeeRegistrar.cpp
@@ -82,7 +82,7 @@ contract FixedFeeRegistrar is Registrar {
}
}
function disown(string _name, address _refund) onlyrecordowner(_name) {
- delete m_recordData[uint(keccak256(_name)) / 8];
+ delete m_recordData[uint(keccak256(bytes(_name))) / 8];
if (!_refund.send(c_fee))
throw;
Changed(_name);
@@ -118,7 +118,7 @@ contract FixedFeeRegistrar is Registrar {
Record[2**253] m_recordData;
function m_record(string _name) constant internal returns (Record storage o_record) {
- return m_recordData[uint(keccak256(_name)) / 8];
+ return m_recordData[uint(keccak256(bytes(_name))) / 8];
}
uint constant c_fee = 69 ether;
}
diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp
index f8ee007d..97a4d632 100644
--- a/test/contracts/Wallet.cpp
+++ b/test/contracts/Wallet.cpp
@@ -398,7 +398,7 @@ contract Wallet is multisig, multiowned, daylimit {
return 0;
}
// determine our operation hash.
- _r = keccak256(msg.data, block.number);
+ _r = keccak256(abi.encodePacked(msg.data, block.number));
if (!confirm(_r) && m_txs[_r].to == 0x0000000000000000000000000000000000000000) {
m_txs[_r].to = _to;
m_txs[_r].value = _value;