()
| 189 | } |
| 190 | |
| 191 | func (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 |
no test coverage detected