Merge pull request #28 from StephenButtolph/bootstrap-oboe

Fixed off by one error in bootstrapping Alpha value
This commit is contained in:
Stephen Buttolph 2020-03-25 12:46:59 -04:00 committed by GitHub
commit 541f762b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -382,7 +382,7 @@ func (m *manager) createAvalancheChain(
Context: ctx, Context: ctx,
Validators: validators, Validators: validators,
Beacons: beacons, Beacons: beacons,
Alpha: (beacons.Len() + 1) / 2, Alpha: beacons.Len()/2 + 1, // must be > 50%
Sender: &sender, Sender: &sender,
}, },
VtxBlocked: vtxBlocker, VtxBlocked: vtxBlocker,
@ -462,7 +462,7 @@ func (m *manager) createSnowmanChain(
Context: ctx, Context: ctx,
Validators: validators, Validators: validators,
Beacons: beacons, Beacons: beacons,
Alpha: (beacons.Len() + 1) / 2, Alpha: beacons.Len()/2 + 1, // must be > 50%
Sender: &sender, Sender: &sender,
}, },
Blocked: blocked, Blocked: blocked,