Skip to content

Commit

Permalink
(floating)
Browse files Browse the repository at this point in the history
  • Loading branch information
pro-wh committed May 20, 2022
1 parent b7933a7 commit 52b0251
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion go/roothash/api/message/incoming_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,18 @@ type IncomingMessage struct {

const LatestIncomingMessageDataVersion = 1

// IncomingMessageData contains any information that does not need to be
// handled at the consensus layer. Storing this as a separate struct allows us
// to make changes to this without causing a consensus-breaking change.
type IncomingMessageData struct {
cbor.Versioned

// Transaction is an embedded transaction.
// Transaction is a runtime transaction.
Transaction *[]byte `json:"tx,omitempty"`

// RuntimeData is any data that does not need to be processed outside the
// runtime.
RuntimeData []byte `json:"rt_data,omitempty"`
}

func (d *IncomingMessageData) ValidateBasic() error {
Expand Down
7 changes: 7 additions & 0 deletions go/runtime/txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ type TransactionPool interface {
// proposal queue.
SubmitProposedBatch(batch [][]byte)

// SubmitIncomingMessageTxs uh
SubmitIncomingMessageTxs(txs [][]byte)

// PromoteProposedBatch promotes the specified transactions that are already in the transaction
// pool into the current proposal queue.
PromoteProposedBatch(batch []hash.Hash)
Expand Down Expand Up @@ -291,6 +294,10 @@ func (t *txPool) SubmitProposedBatch(batch [][]byte) {
}
}

func (t *txPool) SubmitIncomingMessageTxs(txs [][]byte) {

}

func (t *txPool) PromoteProposedBatch(batch []hash.Hash) {
txs, missingTxs := t.GetKnownBatch(batch)
if len(missingTxs) > 0 {
Expand Down

0 comments on commit 52b0251

Please sign in to comment.