mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 18:37:26 +08:00
fix: only check allocations if they exist
This commit is contained in:
parent
baa532640f
commit
8aca6accb2
@ -418,12 +418,15 @@ func (e *GlobalConsensusEngine) evaluateForProposals(
|
||||
|
||||
allocated := false
|
||||
pending := false
|
||||
for _, allocation := range self.Allocations {
|
||||
if bytes.Equal(allocation.ConfirmationFilter, filter) {
|
||||
allocated = allocation.Status != 4
|
||||
if e.config.P2P.Network != 0 || data.Frame.Header.FrameNumber > 252840 {
|
||||
pending = allocation.Status == 0 &&
|
||||
allocation.JoinFrameNumber+360 <= data.Frame.Header.FrameNumber
|
||||
if self != nil {
|
||||
for _, allocation := range self.Allocations {
|
||||
if bytes.Equal(allocation.ConfirmationFilter, filter) {
|
||||
allocated = allocation.Status != 4
|
||||
if e.config.P2P.Network != 0 ||
|
||||
data.Frame.Header.FrameNumber > 252840 {
|
||||
pending = allocation.Status == 0 &&
|
||||
allocation.JoinFrameNumber+360 <= data.Frame.Header.FrameNumber
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user