-
Notifications
You must be signed in to change notification settings - Fork 197
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
transactions pool API endpoint #4009
Conversation
api/groups/transactionGroup_test.go
Outdated
func TestGetTransactionsPoolShouldError(t *testing.T) { | ||
t.Parallel() | ||
|
||
expectedErr := errors.New("i am the 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.
"do not try to be funny" :D
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.
ok :( renamed
func (shardedData *ShardedDataStub) RegisterOnAdded(handler func(key []byte, value interface{})) { | ||
if shardedData.RegisterOnAddedCalled != nil { | ||
shardedData.RegisterOnAddedCalled(handler) | ||
func (sd *ShardedDataStub) RegisterOnAdded(handler func(key []byte, value interface{})) { |
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.
for all stub, I name the receiver pointer as stub
So this will yield as func (stub *ShardedDataStub) RegisterOnAdded(handler func(key []byte, value interface{})) {
This name will match each and every stub we create :D
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 approach. however, it could come in a future PR that changes all stubs, so I wouldn't change this in 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.
right, for all new stubs I do it like this.
// IsInterfaceNil returns true if there is no value under the interface | ||
func (shardedData *ShardedDataStub) IsInterfaceNil() bool { | ||
return shardedData == nil |
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.
from linter:
cannot use facade (variable of type Facade) as type groups.transactionFacadeHandler in argument to groups.NewTransactionGroup:
integrationTests/testProcessorNodeWithTestWebServer.go#L1
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.
fixed
Codecov Report
@@ Coverage Diff @@
## development #4009 +/- ##
===============================================
+ Coverage 74.93% 74.94% +0.01%
===============================================
Files 610 610
Lines 81539 81596 +57
===============================================
+ Hits 61100 61151 +51
- Misses 15792 15797 +5
- Partials 4647 4648 +1
Continue to review full report at Codecov.
|
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.
@@ Log scanner @@
txs-pool-api-endpoint
================================================================================
- Known Warnings 168
- New Warnings 1
- Known Errors 0
- New Errors 0
- Panics 0
================================================================================
added a new API endpoint GET
/transaction/pool
that returns the txs hashes for regular transactions, smart contract results or rewards txs