From 38b840a15ea4a62eefd48d814ae7e394e5ac9ee1 Mon Sep 17 00:00:00 2001 From: dragonheaven Date: Thu, 27 Aug 2020 22:05:31 +0300 Subject: [PATCH 1/2] revert stakerRCD as raw extid --- node/spr.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/node/spr.go b/node/spr.go index 12a27fc..1e7c4d6 100644 --- a/node/spr.go +++ b/node/spr.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "github.com/Factom-Asset-Tokens/factom" - "github.com/pegnet/pegnet/common" "github.com/pegnet/pegnet/modules/graderStake" ) @@ -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) From 8eff2ef92846f5254e4b5afd174c1ea28c123185 Mon Sep 17 00:00:00 2001 From: dragonheaven Date: Thu, 27 Aug 2020 23:52:35 +0300 Subject: [PATCH 2/2] go.mod dependency --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 31bd0fb..b5fd35d 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index b8acb4b..8def6c4 100644 --- a/go.sum +++ b/go.sum @@ -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=