-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove mocks for transaction manager and transaction queue #562
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100 x 👍
We definitely need to clean up overused and autogenerated without a valid reason mocks, so I'm super happy to see this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, wonderful simplification and good step in dropping these autogenerated mocks.
geth/transactions/queue/queue.go
Outdated
@@ -8,17 +8,14 @@ import ( | |||
|
|||
"github.com/ethereum/go-ethereum/accounts/keystore" | |||
gethcommon "github.com/ethereum/go-ethereum/common" | |||
"github.com/status-im/status-go/geth/account" | |||
"github.com/status-im/status-go/geth/common" | |||
"github.com/status-im/status-go/geth/log" | |||
) | |||
|
|||
const ( | |||
// DefaultTxQueueCap defines how many items can be queued. | |||
DefaultTxQueueCap = int(35) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Isn't int
the default here and casting only needed when explicitly wanting something like uint64
or similar.
geth/transactions/queue/queue.go
Outdated
} | ||
|
||
// LockInprogress returns transcation and locks it as inprogress | ||
func (q *TxQueue) LockInprogress(id common.QueuedTxID) (*common.QueuedTx, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LockInprogress()
or LockInProgress()
?
@dshulyak Will you take care of the conflicts, please? Thx. |
It is very unlikely that there will be 2 or more implementations of tx manager and queue, as they are tailored specifically to status project requirements.
5243ddc
to
b2ced14
Compare
@themue rebased, please consider merging it |
It is very unlikely that there will be 2 or more implementations of tx manager and queue, as they are tailored specifically to status project requirements.
Blocked by: #530