Merge pull request #2075 from nspcc-dev/small-refactoring

Array util refactoring and naming improvement
This commit is contained in:
Roman Khimov 2021-07-20 11:29:59 +03:00 committed by GitHub
commit c88ebaede9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 127 additions and 129 deletions

View file

@ -14,6 +14,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neo-go/pkg/util/slice"
"github.com/nspcc-dev/neo-go/pkg/wallet"
"go.uber.org/zap"
)
@ -228,11 +229,8 @@ func (o *Oracle) Run() {
// UpdateNativeContract updates native oracle contract info for tx verification.
func (o *Oracle) UpdateNativeContract(script, resp []byte, h util.Uint160, verifyOffset int) {
o.oracleScript = make([]byte, len(script))
copy(o.oracleScript, script)
o.oracleResponse = make([]byte, len(resp))
copy(o.oracleResponse, resp)
o.oracleScript = slice.Copy(script)
o.oracleResponse = slice.Copy(resp)
o.oracleHash = h
o.verifyOffset = verifyOffset