Commit 557121cb authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #530 from ethereum/fixCompareByteCode

Fix CompareByteCode
parents aff02b67 c83833fc
......@@ -154,10 +154,14 @@ module.exports = {
* Compare bytecode. return true if the code is equal (handle swarm hash and library references)
* @param {String} code1 - the bytecode that is actually deployed (contains resolved library reference and a potentially different swarmhash)
* @param {String} code2 - the bytecode generated by the compiler (contains unresolved library reference and a potentially different swarmhash)
this will return false if the generated bytecode is empty (asbtract contract cannot be deployed)
*
* @return {bool}
*/
compareByteCode: function (code1, code2) {
if (code1 === code2) return true
if (code2 === '0x') return false // abstract contract. see comment
var pos = -1
while ((pos = code2.search(/__(.*)__/)) !== -1) {
code2 = replaceLibReference(code2, pos)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment