Skip to content

Commit

Permalink
update QueryChallenge (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
AstaFrode authored May 17, 2023
1 parent 380dcf8 commit f0df6f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/client/netinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ func (c *Cli) QueryChallenge(pubkey []byte) (ChallengeInfo, error) {
if err != nil {
return chal, err
}
chal.RandomIndexList = make([]uint32, len(netinfo.NetSnapshot.RandomIndexList))
chal.Random = make([][]byte, len(netinfo.NetSnapshot.Random))
for _, v := range netinfo.MinerSnapShot {
if v.Miner == *acc {
for k, value := range netinfo.NetSnapshot.Random {
chal.Random[k] = []byte(string(value[:]))
chal.RandomIndexList[k] = uint32(netinfo.NetSnapshot.RandomIndexList[k])
}
chal.Start = uint32(netinfo.NetSnapshot.Start)
break
Expand Down

0 comments on commit f0df6f2

Please sign in to comment.