dao: drop unused AppendNEP17Transfer()
This commit is contained in:
parent
c63aeb38bb
commit
095ed3f64e
1 changed files with 0 additions and 20 deletions
|
@ -31,7 +31,6 @@ var (
|
|||
// DAO is a data access object.
|
||||
type DAO interface {
|
||||
AppendAppExecResult(aer *state.AppExecResult, buf *io.BufBinWriter) error
|
||||
AppendNEP17Transfer(acc util.Uint160, index uint32, isNew bool, tr *state.NEP17Transfer) (bool, error)
|
||||
DeleteBlock(h util.Uint256, buf *io.BufBinWriter) error
|
||||
DeleteContractID(id int32) error
|
||||
DeleteStorageItem(id int32, key []byte) error
|
||||
|
@ -204,25 +203,6 @@ func (dao *Simple) PutTokenTransferLog(acc util.Uint160, index uint32, lg *state
|
|||
return dao.Store.Put(key, lg.Raw)
|
||||
}
|
||||
|
||||
// AppendNEP17Transfer appends a single NEP17 transfer to a log.
|
||||
// First return value signalizes that log size has exceeded batch size.
|
||||
func (dao *Simple) AppendNEP17Transfer(acc util.Uint160, index uint32, isNew bool, tr *state.NEP17Transfer) (bool, error) {
|
||||
var lg *state.TokenTransferLog
|
||||
if isNew {
|
||||
lg = new(state.TokenTransferLog)
|
||||
} else {
|
||||
var err error
|
||||
lg, err = dao.GetTokenTransferLog(acc, index)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
if err := lg.Append(tr); err != nil {
|
||||
return false, err
|
||||
}
|
||||
return lg.Size() >= state.TokenTransferBatchSize, dao.PutTokenTransferLog(acc, index, lg)
|
||||
}
|
||||
|
||||
// -- end transfer log.
|
||||
|
||||
// -- start notification event.
|
||||
|
|
Loading…
Reference in a new issue