core: fix gas generation coefficients to match Neo 3

Follow neo-project/neo#911. Fixes state differences at block 4528 of preview2
testnet compared to C# node.
This commit is contained in:
Roman Khimov 2020-06-23 17:31:09 +03:00
parent 2f8e7e4d33
commit c124d2bcdf
2 changed files with 4 additions and 5 deletions

View file

@ -54,7 +54,7 @@ var (
ErrInvalidBlockIndex error = errors.New("invalid block index")
)
var (
genAmount = []int{8, 7, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
genAmount = []int{6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
decrementInterval = 2000000
persistInterval = 1 * time.Second
)

View file

@ -147,7 +147,7 @@ var rpcTestCases = map[string][]rpcTestCase{
},
{
Asset: e.chain.UtilityTokenHash(),
Amount: "924.01732700",
Amount: "918.01738700",
LastUpdated: 6,
}},
Address: testchain.PrivateKeyByID(0).GetScriptHash().StringLE(),
@ -229,7 +229,7 @@ var rpcTestCases = map[string][]rpcTestCase{
Timestamp: blockSendNEO.Timestamp,
Asset: e.chain.UtilityTokenHash(),
Address: "", // Minted GAS.
Amount: "23.99976000",
Amount: "17.99982000",
Index: 4,
NotifyIndex: 0,
TxHash: txSendNEOHash,
@ -565,8 +565,7 @@ var rpcTestCases = map[string][]rpcTestCase{
check: func(t *testing.T, e *executor, resp interface{}) {
s, ok := resp.(*string)
require.True(t, ok)
// Incorrect, to be fixed later.
assert.Equal(t, "48000", *s)
assert.Equal(t, "36000", *s)
},
},
},