Skip to content

Commit

Permalink
Merge pull request #155 from dragonheaven/feature/spr_extids
Browse files Browse the repository at this point in the history
stakerRCD
  • Loading branch information
StarNeit authored Aug 27, 2020
2 parents cdfc768 + 8eff2ef commit 6605071
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/AdamSLevy/jsonrpc2/v13 v13.0.1
github.com/Factom-Asset-Tokens/factom v0.0.0-20191114224337-71de98ff5b3e
github.com/mattn/go-sqlite3 v1.11.0
github.com/pegnet/pegnet v0.5.1-0.20200826220145-532bd212e1b6
github.com/pegnet/pegnet v0.5.1-0.20200827205036-100de49eec4c
github.com/rs/cors v1.7.0
github.com/sirupsen/logrus v1.4.2
github.com/spf13/cobra v0.0.5
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ github.com/pegnet/pegnet v0.5.1-0.20200821215317-2516c8c4196a h1:f+q9XPktXlURvO6
github.com/pegnet/pegnet v0.5.1-0.20200821215317-2516c8c4196a/go.mod h1:Fy8Qohe9zIuqO9Q/ZOLUNpP2kuiFqxjevzaS3IL62+E=
github.com/pegnet/pegnet v0.5.1-0.20200826220145-532bd212e1b6 h1:ucPKH3+vQ/2ktMd3v50331rk5ZLvJN1P5AiYfpk8aP4=
github.com/pegnet/pegnet v0.5.1-0.20200826220145-532bd212e1b6/go.mod h1:NxKKJ9wnx/EvzfHk0p6XPlQqXIJg0iA4po0vzsdNx0o=
github.com/pegnet/pegnet v0.5.1-0.20200827205036-100de49eec4c h1:h23Cy3bYjLS6lIf309Z32OYkGnTzlzVi1PF2zatpOqQ=
github.com/pegnet/pegnet v0.5.1-0.20200827205036-100de49eec4c/go.mod h1:NxKKJ9wnx/EvzfHk0p6XPlQqXIJg0iA4po0vzsdNx0o=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=
Expand Down
9 changes: 1 addition & 8 deletions node/spr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"github.com/Factom-Asset-Tokens/factom"
"github.com/pegnet/pegnet/common"
"github.com/pegnet/pegnet/modules/graderStake"
)

Expand Down Expand Up @@ -38,13 +37,7 @@ func (d *Pegnetd) GradeS(ctx context.Context, block *factom.EBlock) (graderStake
extids[i] = entry.ExtIDs[i]
}
// allow only top 100 stake holders submit prices
var stakerRCD []byte
if block.Height >= V20HeightActivation {
stakerRCD = extids[1]
}
if block.Height >= SprSignatureActivation {
stakerRCD = common.ComputeRCDFromPubkey(extids[1])
}
stakerRCD := extids[1]
if d.Pegnet.IsIncludedTopPEGAddress(stakerRCD) {
// ignore bad opr errors
err = g.AddSPR(entry.Hash[:], extids, entry.Content)
Expand Down

0 comments on commit 6605071

Please sign in to comment.