From 860c1462601347e2d65723d5ebb2a6ab2de603ab Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 6 Nov 2020 10:50:45 +0300 Subject: [PATCH] native: increase committee GAS bounty Follow neo-project/neo#2049 . --- pkg/core/helper_test.go | 2 +- pkg/core/native/native_neo.go | 4 ++-- pkg/core/native_neo_test.go | 2 +- pkg/rpc/server/server_test.go | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/core/helper_test.go b/pkg/core/helper_test.go index d0bdf4477..f41c09d24 100644 --- a/pkg/core/helper_test.go +++ b/pkg/core/helper_test.go @@ -178,7 +178,7 @@ func TestCreateBasicChain(t *testing.T) { priv0 := testchain.PrivateKeyByID(0) priv0ScriptHash := priv0.GetScriptHash() - require.Equal(t, big.NewInt(2500_0000), bc.GetUtilityTokenBalance(priv0ScriptHash)) // gas bounty + require.Equal(t, big.NewInt(5000_0000), bc.GetUtilityTokenBalance(priv0ScriptHash)) // gas bounty // Move some NEO to one simple account. txMoveNeo := newNEP5Transfer(neoHash, neoOwner, priv0ScriptHash, neoAmount) txMoveNeo.ValidUntilBlock = validUntilBlock diff --git a/pkg/core/native/native_neo.go b/pkg/core/native/native_neo.go index f0d06c48d..9922d8cd9 100644 --- a/pkg/core/native/native_neo.go +++ b/pkg/core/native/native_neo.go @@ -68,9 +68,9 @@ const ( // neoHolderRewardRatio is a percent of generated GAS that is distributed to NEO holders. neoHolderRewardRatio = 10 // neoHolderRewardRatio is a percent of generated GAS that is distributed to committee. - committeeRewardRatio = 5 + committeeRewardRatio = 10 // neoHolderRewardRatio is a percent of generated GAS that is distributed to voters. - voterRewardRatio = 85 + voterRewardRatio = 80 ) var ( diff --git a/pkg/core/native_neo_test.go b/pkg/core/native_neo_test.go index 28f6f3a6a..c1e3f41ce 100644 --- a/pkg/core/native_neo_test.go +++ b/pkg/core/native_neo_test.go @@ -288,7 +288,7 @@ func TestNEO_CommitteeBountyOnPersist(t *testing.T) { hs[i] = testchain.PrivateKeyByID(i).GetScriptHash() } - const singleBounty = 25000000 + const singleBounty = 50000000 bs := map[int]int64{0: singleBounty} checkBalances := func() { for i := 0; i < testchain.CommitteeSize(); i++ { diff --git a/pkg/rpc/server/server_test.go b/pkg/rpc/server/server_test.go index 079a6821b..2e4375c5a 100644 --- a/pkg/rpc/server/server_test.go +++ b/pkg/rpc/server/server_test.go @@ -1214,7 +1214,7 @@ func checkNep5Balances(t *testing.T, e *executor, acc interface{}) { }, { Asset: e.chain.UtilityTokenHash(), - Amount: "799.59641770", + Amount: "800.09641770", LastUpdated: 7, }}, Address: testchain.PrivateKeyByID(0).GetScriptHash().StringLE(), @@ -1361,7 +1361,7 @@ func checkNep5TransfersAux(t *testing.T, e *executor, acc interface{}, sent, rcv Timestamp: blockGASBounty.Timestamp, Asset: e.chain.UtilityTokenHash(), Address: "", - Amount: "0.25000000", + Amount: "0.50000000", Index: 6, NotifyIndex: 0, TxHash: blockGASBounty.Hash(), @@ -1406,7 +1406,7 @@ func checkNep5TransfersAux(t *testing.T, e *executor, acc interface{}, sent, rcv Timestamp: blockGASBounty0.Timestamp, Asset: e.chain.UtilityTokenHash(), Address: "", - Amount: "0.25000000", + Amount: "0.50000000", Index: 0, TxHash: blockGASBounty0.Hash(), },