forked from TrueCloudLab/neoneo-go
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:
parent
2f8e7e4d33
commit
c124d2bcdf
2 changed files with 4 additions and 5 deletions
|
@ -54,7 +54,7 @@ var (
|
||||||
ErrInvalidBlockIndex error = errors.New("invalid block index")
|
ErrInvalidBlockIndex error = errors.New("invalid block index")
|
||||||
)
|
)
|
||||||
var (
|
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
|
decrementInterval = 2000000
|
||||||
persistInterval = 1 * time.Second
|
persistInterval = 1 * time.Second
|
||||||
)
|
)
|
||||||
|
|
|
@ -147,7 +147,7 @@ var rpcTestCases = map[string][]rpcTestCase{
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Asset: e.chain.UtilityTokenHash(),
|
Asset: e.chain.UtilityTokenHash(),
|
||||||
Amount: "924.01732700",
|
Amount: "918.01738700",
|
||||||
LastUpdated: 6,
|
LastUpdated: 6,
|
||||||
}},
|
}},
|
||||||
Address: testchain.PrivateKeyByID(0).GetScriptHash().StringLE(),
|
Address: testchain.PrivateKeyByID(0).GetScriptHash().StringLE(),
|
||||||
|
@ -229,7 +229,7 @@ var rpcTestCases = map[string][]rpcTestCase{
|
||||||
Timestamp: blockSendNEO.Timestamp,
|
Timestamp: blockSendNEO.Timestamp,
|
||||||
Asset: e.chain.UtilityTokenHash(),
|
Asset: e.chain.UtilityTokenHash(),
|
||||||
Address: "", // Minted GAS.
|
Address: "", // Minted GAS.
|
||||||
Amount: "23.99976000",
|
Amount: "17.99982000",
|
||||||
Index: 4,
|
Index: 4,
|
||||||
NotifyIndex: 0,
|
NotifyIndex: 0,
|
||||||
TxHash: txSendNEOHash,
|
TxHash: txSendNEOHash,
|
||||||
|
@ -565,8 +565,7 @@ var rpcTestCases = map[string][]rpcTestCase{
|
||||||
check: func(t *testing.T, e *executor, resp interface{}) {
|
check: func(t *testing.T, e *executor, resp interface{}) {
|
||||||
s, ok := resp.(*string)
|
s, ok := resp.(*string)
|
||||||
require.True(t, ok)
|
require.True(t, ok)
|
||||||
// Incorrect, to be fixed later.
|
assert.Equal(t, "36000", *s)
|
||||||
assert.Equal(t, "48000", *s)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue