Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/core/native/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func NewDefaultContracts(cfg config.ProtocolConfiguration) []interop.Contract {

gas := newGAS(int64(cfg.InitialGASSupply))
neo := newNEO(cfg)
policy := newPolicy()
policy := NewPolicy()
neo.GAS = gas
neo.Policy = policy
gas.NEO = neo
Expand All @@ -254,7 +254,7 @@ func NewDefaultContracts(cfg config.ProtocolConfiguration) []interop.Contract {
oracle.NEO = neo
oracle.Desig = desig

notary := newNotary()
notary := NewNotary()
notary.GAS = gas
notary.NEO = neo
notary.Desig = desig
Expand Down
4 changes: 2 additions & 2 deletions pkg/core/native/management_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (n neo) RevokeVotes(ic *interop.Context, h util.Uint160) error { return

func TestDeployGetUpdateDestroyContract(t *testing.T) {
mgmt := NewManagement()
p := newPolicy()
p := NewPolicy()
p.NEO = neo{}
mgmt.Policy = p

Expand Down Expand Up @@ -126,7 +126,7 @@ func TestManagement_Initialize(t *testing.T) {

func TestManagement_GetNEP17Contracts(t *testing.T) {
mgmt := NewManagement()
mgmt.Policy = newPolicy()
mgmt.Policy = NewPolicy()
d := dao.NewSimple(storage.NewMemoryStore(), false)
err := mgmt.Initialize(&interop.Context{DAO: d}, nil, nil)
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions pkg/core/native/notary.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ func copyNotaryCache(src, dst *NotaryCache) {
*dst = *src
}

// newNotary returns Notary native contract.
func newNotary() *Notary {
// NewNotary returns Notary native contract.
func NewNotary() *Notary {
n := &Notary{ContractMD: *interop.NewContractMD(nativenames.Notary, nativeids.Notary, func(m *manifest.Manifest, hf config.Hardfork) {
m.SupportedStandards = []string{manifest.NEP27StandardName}
if hf.Cmp(config.HFFaun) >= 0 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/core/native/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ func copyPolicyCache(src, dst *PolicyCache) {
dst.whitelistedContracts = slices.Clone(src.whitelistedContracts)
}

// newPolicy returns Policy native contract.
func newPolicy() *Policy {
// NewPolicy returns Policy native contract.
func NewPolicy() *Policy {
p := &Policy{ContractMD: *interop.NewContractMD(nativenames.Policy, nativeids.PolicyContract)}
defer p.BuildHFSpecificMD(p.ActiveIn())

Expand Down
Loading