Skip to content

Commit

Permalink
Force minute 10 to be minute 9 for GetVirtualServers
Browse files Browse the repository at this point in the history
  • Loading branch information
factom-clay committed Nov 1, 2018
1 parent e8403d3 commit e13ecd2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions state/processList.go
Expand Up @@ -263,13 +263,17 @@ func FedServerVM(serverMap [10][64]int, numberOfFedServers int, minute int, fedI
}

func (p *ProcessList) GetVirtualServers(minute int, identityChainID interfaces.IHash) (found bool, index int) {
//fmt.Fprintf(os.Stderr, "GetVirtualServers(%d,%x)", minute, identityChainID.Bytes()[3:6])
found, fedIndex := p.GetFedServerIndexHash(identityChainID)
if !found {
return false, -1
}

p.MakeMap()

if minute > 9 {
minute = 9 // in case we get called between blocks.
}
for i := 0; i < len(p.FedServers); i++ {
fedix := p.ServerMap[minute][i]
if fedix == fedIndex {
Expand Down

0 comments on commit e13ecd2

Please sign in to comment.