Skip to content

Commit

Permalink
Merge branch 'rollup062018' of github.com:FactomProject/factomd into …
Browse files Browse the repository at this point in the history
…rollup062018
  • Loading branch information
PaulSnow committed Jun 21, 2018
2 parents 0cf9020 + 6da02a1 commit ae738b1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions activations/activationHeight.go
Expand Up @@ -36,9 +36,9 @@ func init() {
Activation{"ElectionNoSort", ELECTION_NO_SORT, "Disable sorting of severs after elections",
map[string]int{
"MAIN": 146060 + 8*24*10 + 1, // On 6/20/18 11:45 mainnet was 146060, we want activation at 6/28/18 at ~12pm
"TEST": 32756 + 2*24*10 + 1, // On 6/20/18 11:45 testnet was 146060, we want activation at 6/22/18 at ~12pm
"TEST": 0, // On 6/20/18 11:45 testnet was 146060, we want activation at 6/22/18 at ~12pm
"LOCAL": 10, // Must be > 6 for TestActivationHeightElection to pass
"CUSTOM:fct_community_test": 32756 + 2*24*10 + 1, // On 6/20/18 11:45 testnet was 146060, we want activation at 6/22/18 at ~12pm
"CUSTOM:fct_community_test": 32908 + 2*24*10, // On 6/21/18 2:04 testnet was 32908, we want activation at 6/23/18 at 2:00pm
},
},
}
Expand Down
20 changes: 14 additions & 6 deletions state/ack.go
Expand Up @@ -286,12 +286,20 @@ func (s *State) getACKStatus(hash interfaces.IHash, useOldMsgs bool) (int, inter
for _, pl := range s.ProcessLists.Lists {
//pl := s.ProcessLists.LastList()
if useOldMsgs {
m := pl.GetOldMsgs(hash)
if m != nil {
return constants.AckStatusACK, hash, m.GetTimestamp(), nil, nil
}
if pl.DirectoryBlock == nil { // can't use m.getTimestamp, m might == nil
return constants.AckStatusACK, hash, nil, nil, nil
aMsg := pl.GetOldAck(hash)
if aMsg != nil { // No ack then it's not "known"
a, ok := aMsg.(*messages.Ack)
if !ok {
// probably deserves a panic here if we got an old ack and it wasn't an ack
return constants.AckStatusUnknown, hash, nil, nil, nil
}
if pl.VMs[a.GetVMIndex()].Height < int(a.Height) {
// if it is in the process list but has not yet been process then claim it's unknown
// Otherwise it might get an ack status but still be un-spendable
return constants.AckStatusNotConfirmed, hash, nil, nil, nil
} else {
return constants.AckStatusACK, hash, a.GetTimestamp(), nil, nil
}
}
}

Expand Down

0 comments on commit ae738b1

Please sign in to comment.