dao: drop DAO interface

It's a remnant from the days when we had Simple and Cached DAO
implementations, now it makes zero sense.
This commit is contained in:
Roman Khimov 2022-02-16 18:04:47 +03:00
parent 9d2ef775cf
commit aefb26255a
15 changed files with 79 additions and 122 deletions

View file

@ -54,21 +54,21 @@ type Context struct {
Block *block.Block
NonceData [16]byte
Tx *transaction.Transaction
DAO dao.DAO
DAO *dao.Simple
Notifications []state.NotificationEvent
Log *zap.Logger
VM *vm.VM
Functions []Function
Invocations map[util.Uint160]int
cancelFuncs []context.CancelFunc
getContract func(dao.DAO, util.Uint160) (*state.Contract, error)
getContract func(*dao.Simple, util.Uint160) (*state.Contract, error)
baseExecFee int64
signers []transaction.Signer
}
// NewContext returns new interop context.
func NewContext(trigger trigger.Type, bc Ledger, d dao.DAO,
getContract func(dao.DAO, util.Uint160) (*state.Contract, error), natives []Contract,
func NewContext(trigger trigger.Type, bc Ledger, d *dao.Simple,
getContract func(*dao.Simple, util.Uint160) (*state.Contract, error), natives []Contract,
block *block.Block, tx *transaction.Transaction, log *zap.Logger) *Context {
baseExecFee := int64(DefaultBaseExecFee)
dao := d.GetWrapped()