core: rename *block.Base.GetHashableData to GetSignedPart()
This allow to use `Block` as a Verifiable item. When tx is provided, it is set as an interop's script container. Otherwise, block is set.
This commit is contained in:
parent
a92872931c
commit
82b230f19f
5 changed files with 15 additions and 8 deletions
|
@ -2057,5 +2057,12 @@ func (bc *Blockchain) secondsPerBlock() int {
|
|||
}
|
||||
|
||||
func (bc *Blockchain) newInteropContext(trigger trigger.Type, d dao.DAO, block *block.Block, tx *transaction.Transaction) *interop.Context {
|
||||
return interop.NewContext(trigger, bc, d, block, tx, bc.log)
|
||||
ic := interop.NewContext(trigger, bc, d, block, tx, bc.log)
|
||||
switch {
|
||||
case tx != nil:
|
||||
ic.Container = tx
|
||||
case block != nil:
|
||||
ic.Container = block
|
||||
}
|
||||
return ic
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue