Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
calbera committed Feb 15, 2024
1 parent af3712d commit a331cc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/transactor/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (TxRequest) New() types.Marshallable {
return &TxRequest{}
}

// String() implements fmt.Stringer
// String() implements fmt.Stringer.
func (tx *TxRequest) String() string {
return tx.MsgID
}
Expand Down
5 changes: 3 additions & 2 deletions types/queue/mem/mem.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"container/list"
"sync"

"github.com/berachain/go-utils/utils"
"github.com/berachain/offchain-sdk/types/queue/types"
)

Expand Down Expand Up @@ -45,7 +46,7 @@ func (q *Queue[T]) Receive() (string, T, bool) {
}

q.queuedItems.Remove(element)
val := element.Value.(T)
val := utils.MustGetAs[T](element.Value)
msgID := val.String()
q.inProgressItems[msgID] = element

Expand All @@ -62,7 +63,7 @@ func (q *Queue[T]) ReceiveMany(num int32) ([]string, []T, error) {
for i := int32(0); i < num; i++ {
if element := q.queuedItems.Front(); element != nil {
q.queuedItems.Remove(element)
val := element.Value.(T)
val := utils.MustGetAs[T](element.Value)
msgID := val.String()
q.inProgressItems[msgID] = element
msgIDs = append(msgIDs, msgID)
Expand Down

0 comments on commit a331cc1

Please sign in to comment.