oracle: ensure proper ValidUntilBlock for backup tx
See neo-project/neo-modules#608.
This commit is contained in:
parent
5e26170b79
commit
0bad413e23
2 changed files with 7 additions and 2 deletions
|
@ -81,10 +81,10 @@ func readResponse(rc gio.ReadCloser, limit int) ([]byte, error) {
|
|||
}
|
||||
|
||||
// CreateResponseTx creates unsigned oracle response transaction.
|
||||
func (o *Oracle) CreateResponseTx(gasForResponse int64, height uint32, resp *transaction.OracleResponse) (*transaction.Transaction, error) {
|
||||
func (o *Oracle) CreateResponseTx(gasForResponse int64, vub uint32, resp *transaction.OracleResponse) (*transaction.Transaction, error) {
|
||||
tx := transaction.New(o.oracleResponse, 0)
|
||||
tx.Nonce = uint32(resp.ID)
|
||||
tx.ValidUntilBlock = height + o.Chain.GetConfig().MaxValidUntilBlockIncrement
|
||||
tx.ValidUntilBlock = vub
|
||||
tx.Attributes = []transaction.Attribute{{
|
||||
Type: transaction.OracleResponseT,
|
||||
Value: resp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue