Skip to content

Commit 08808c4

Browse files
committed
IsIncludedTopPEGAddress
1 parent fdb5d74 commit 08808c4

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/AdamSLevy/jsonrpc2/v13 v13.0.1
77
github.com/Factom-Asset-Tokens/factom v0.0.0-20191114224337-71de98ff5b3e
88
github.com/mattn/go-sqlite3 v1.11.0
9-
github.com/pegnet/pegnet v0.5.1-0.20200723222201-c2cae6127a81
9+
github.com/pegnet/pegnet v0.5.1-0.20200723222201-c2cae6127a81 // this is staging branch of pegnet
1010
github.com/rs/cors v1.7.0
1111
github.com/sirupsen/logrus v1.4.2
1212
github.com/spf13/cobra v0.0.5

node/spr.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,13 @@ func (d *Pegnetd) GradeS(ctx context.Context, block *factom.EBlock) (graderStake
3535
}
3636
// allow only top 100 stake holders submit prices
3737
stakerRCD := extids[1]
38-
if !d.Pegnet.IsIncludedTopPEGAddress(stakerRCD) {
39-
return nil, fmt.Errorf("trying to submit without enough peg. only top 100 peg holders can submit prices")
40-
}
41-
// ignore bad opr errors
42-
err = g.AddSPR(entry.Hash[:], extids, entry.Content)
43-
if err != nil {
44-
// This is a noisy debug print
45-
//logrus.WithError(err).WithFields(logrus.Fields{"hash": entry.Hash.String()}).Debug("failed to add spr")
38+
if d.Pegnet.IsIncludedTopPEGAddress(stakerRCD) {
39+
// ignore bad opr errors
40+
err = g.AddSPR(entry.Hash[:], extids, entry.Content)
41+
if err != nil {
42+
// This is a noisy debug print
43+
//logrus.WithError(err).WithFields(logrus.Fields{"hash": entry.Hash.String()}).Debug("failed to add spr")
44+
}
4645
}
4746
}
4847

0 commit comments

Comments
 (0)