MCPcopy Create free account
hub / github.com/DNAProject/DNA / NewNativeService

Method NewNativeService

smartcontract/smart_contract.go:191–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

189}
190
191func (this *SmartContract) NewNativeService() (*native.NativeService, error) {
192 if !this.checkContexts() {
193 return nil, fmt.Errorf("%s", "engine over max limit!")
194 }
195 service := &native.NativeService{
196 CacheDB: this.CacheDB,
197 ContextRef: this,
198 Tx: this.Config.Tx,
199 Time: this.Config.Time,
200 Height: this.Config.Height,
201 BlockHash: this.Config.BlockHash,
202 ServiceMap: make(map[string]native.Handler),
203 }
204 return service, nil
205}
206
207// CheckWitness check whether authorization correct
208// If address is wallet address, check whether in the signature addressed list

Callers 1

refreshGlobalParamFunction · 0.95

Calls 2

checkContextsMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected