Add account address to StakeInfo

pull/784/head
Eugene Kim 6 years ago
parent 75a92d7b10
commit e9d1324ecc
  1. 1
      contracts/structs/structs.go
  2. 1
      node/staking.go

@ -21,6 +21,7 @@ type StakeInfoReturnValue struct {
// StakeInfo stores the staking information for a staker.
type StakeInfo struct {
Account common.Address
BlsPublicKey types.BlsPublicKey
BlockNum *big.Int
LockPeriodCount *big.Int // The number of locking period the token will be locked.

@ -51,6 +51,7 @@ func (node *Node) UpdateStakingList(stakeInfoReturnValue *structs.StakeInfoRetur
copy(blsPubKey[32:64], stakeInfoReturnValue.BlsPubicKeys2[i][:])
copy(blsPubKey[64:96], stakeInfoReturnValue.BlsPubicKeys2[i][:])
node.CurrentStakes[addr] = &structs.StakeInfo{
Account: addr,
BlsPublicKey: blsPubKey,
BlockNum: blockNum,
LockPeriodCount: lockPeriodCount,

Loading…
Cancel
Save