aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-12 18:39:34 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 13:49:52 +0800
commitc0cb1ac83fc915caef9109c4fc9bd50353bb0a79 (patch)
tree4dd514830ce8a12aaff02682e5e7c4e59e0da4a3
parent9dd84a80d840091ed949512543aea6e262c96b6d (diff)
downloaddexon-c0cb1ac83fc915caef9109c4fc9bd50353bb0a79.tar
dexon-c0cb1ac83fc915caef9109c4fc9bd50353bb0a79.tar.gz
dexon-c0cb1ac83fc915caef9109c4fc9bd50353bb0a79.tar.bz2
dexon-c0cb1ac83fc915caef9109c4fc9bd50353bb0a79.tar.lz
dexon-c0cb1ac83fc915caef9109c4fc9bd50353bb0a79.tar.xz
dexon-c0cb1ac83fc915caef9109c4fc9bd50353bb0a79.tar.zst
dexon-c0cb1ac83fc915caef9109c4fc9bd50353bb0a79.zip
core: vm: allow other people to stake for a node
-rw-r--r--core/vm/governance.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/core/vm/governance.go b/core/vm/governance.go
index fa9f578be..ef7c9d6eb 100644
--- a/core/vm/governance.go
+++ b/core/vm/governance.go
@@ -1424,12 +1424,6 @@ func (g *GovernanceContract) stake(publicKey []byte) ([]byte, error) {
return nil, errExecutionReverted
}
- // Make sure the public key belongs to the caller.
- if crypto.PubkeyToAddress(*pk) != caller {
- g.penalize()
- return nil, errExecutionReverted
- }
-
offset = g.state.NodesLength()
g.state.PushNode(&nodeInfo{
Owner: caller,