core: do not persist Policy contract
It has nothing to persist.
This commit is contained in:
parent
18204ec21a
commit
230700ee81
1 changed files with 5 additions and 0 deletions
|
@ -57,6 +57,11 @@ func (cs *Contracts) GetPersistScript() []byte {
|
|||
w := io.NewBufBinWriter()
|
||||
for i := range cs.Contracts {
|
||||
md := cs.Contracts[i].Metadata()
|
||||
// Not every contract is persisted:
|
||||
// https://github.com/neo-project/neo/blob/master/src/neo/Ledger/Blockchain.cs#L90
|
||||
if md.ContractID == policyContractID {
|
||||
continue
|
||||
}
|
||||
emit.Int(w.BinWriter, 0)
|
||||
emit.Opcode(w.BinWriter, opcode.NEWARRAY)
|
||||
emit.String(w.BinWriter, "onPersist")
|
||||
|
|
Loading…
Reference in a new issue