fix comments

pull/516/head
Minh Doan 6 years ago committed by Minh Doan
parent 9bf1fb827f
commit cdadb1da0f
  1. 8
      api/service/staking/service.go
  2. 2
      core/types/shard_state.go

@ -178,11 +178,11 @@ func (s *Service) createRawStakingMessage() []byte {
tx := types.NewTransaction( tx := types.NewTransaction(
stakingInfo.Nonce, stakingInfo.Nonce,
toAddress, toAddress,
0, // beacon chain. 0,
big.NewInt(s.stakingAmount), big.NewInt(s.stakingAmount),
params.TxGas*10, // hard-code params.TxGas*10,
nil, // pick some predefined gas price. nil,
common.FromHex("0xd0e30db0")) // Refer to Node.DepositFuncSignature common.FromHex("0xd0e30db0"))
if signedTx, err := types.SignTx(tx, types.HomesteadSigner{}, s.accountKey); err == nil { if signedTx, err := types.SignTx(tx, types.HomesteadSigner{}, s.accountKey); err == nil {
ts := types.Transactions{signedTx} ts := types.Transactions{signedTx}

@ -54,7 +54,7 @@ func (ss ShardState) Hash() (h common.Hash) {
return h return h
} }
// CompareNodeID compares two nodes by their ID; used to sort node list // CompareNodeInfo compares two nodes by their ID; used to sort node list
func CompareNodeInfo(n1 NodeInfo, n2 NodeInfo) int { func CompareNodeInfo(n1 NodeInfo, n2 NodeInfo) int {
if n1.NodeID < n2.NodeID { if n1.NodeID < n2.NodeID {
return -1 return -1

Loading…
Cancel
Save