(to []byte, transaction *sequence.Transaction)
| 511 | } |
| 512 | |
| 513 | func (buf *Buffer) WriteSequenceExecute(to []byte, transaction *sequence.Transaction) (EncodeType, error) { |
| 514 | var t EncodeType |
| 515 | |
| 516 | t, err := buf.WriteSequenceNonce(transaction.Nonce, false) |
| 517 | if err != nil { |
| 518 | return Stateless, err |
| 519 | } |
| 520 | |
| 521 | tt, err := buf.WriteSequenceTransactions(transaction.Transactions) |
| 522 | if err != nil { |
| 523 | return Stateless, err |
| 524 | } |
| 525 | t = maxPriority(t, tt) |
| 526 | |
| 527 | tt, err = buf.WriteSequenceSignature(transaction.Signature, true) |
| 528 | if err != nil { |
| 529 | return Stateless, err |
| 530 | } |
| 531 | t = maxPriority(t, tt) |
| 532 | |
| 533 | if to != nil { |
| 534 | tt, err = buf.WriteWord(to, true) |
| 535 | if err != nil { |
| 536 | return Stateless, err |
| 537 | } |
| 538 | } |
| 539 | |
| 540 | return maxPriority(t, tt), nil |
| 541 | } |
| 542 | |
| 543 | func (buf *Buffer) WriteSequenceSignature(signature []byte, mayUseBytes bool) (EncodeType, error) { |
| 544 | // First byte determines the signature type |
no test coverage detected