Skip to content

Commit

Permalink
nvm: add mainnet multiSig fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qywang2012 committed Mar 29, 2020
1 parent dbd5641 commit 7cd1c96
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions nf/nvm/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,22 @@ func StorageGetFunc(handler unsafe.Pointer, key *C.char, gasCnt *C.size_t) *C.ch
return nil
}

if v8.ctx.tx.ChainID() == core.MainNetID &&
core.NodeUpdateAtHeight(v8.ctx.block.Height()) &&
v8.ctx.block.Height() < core.NebCompatibility.NodeUpdateHeight()+100000 {

multiSig, _ := core.AddressParse("n1vA3QECcxzVo9ieZbn68RQedopicG1TaJh")
if storage.Address().Equals(multiSig.Bytes()) && k == "_coSigners" {
value := "[\"n1YuDetHCjhzynuEJnPjQZBeVcbEh1ufrAg\"]"
logging.VLog().WithFields(logrus.Fields{
"key": k,
"old": string(val),
"new": value,
}).Debug("multiSig storage key.")
return C.CString(value)
}
}

return C.CString(string(val))
}

Expand Down

0 comments on commit 7cd1c96

Please sign in to comment.