native: don't call CreateNativeContractHash() in oracle contract

Move oracleScript from global context to Oracle itself. We have the hash
already computed by NewContractMD, there is no need to repeat this
calculation.
This commit is contained in:
Roman Khimov 2021-01-22 11:28:13 +03:00
parent dfc23c4246
commit 6b9b37f170
4 changed files with 22 additions and 26 deletions

View file

@ -500,7 +500,7 @@ func TestVerifyTx(t *testing.T) {
// We need to create new transaction,
// because hashes are cached after signing.
getOracleTx := func(t *testing.T) *transaction.Transaction {
tx := bc.newTestTx(h, native.GetOracleResponseScript())
tx := bc.newTestTx(h, orc.GetOracleResponseScript())
resp := &transaction.OracleResponse{
ID: 1,
Code: transaction.Success,