Skip to content
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

GH-744-Review-3 #563

Open
wants to merge 13 commits into
base: GH-744-Review-2-Base
Choose a base branch
from
Open

GH-744-Review-3 #563

wants to merge 13 commits into from

Conversation

Syther007
Copy link
Collaborator

No description provided.

@Syther007 Syther007 self-assigned this Dec 18, 2024
@kauri-hero kauri-hero requested a review from bertllll December 18, 2024 10:45
#[test]
#[ignore]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this? Shouldn't you do it in this card? If you don't know what is causing it we can have a look in the team meeting.

@@ -372,7 +376,7 @@ impl BlockchainInterfaceWeb3 {
);

Ok(RetrievedBlockchainTransactions {
new_start_block: transaction_max_block_number,
new_start_block: transaction_max_block_number + 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is good. Just take caution for the start_block_fallback_value and its computation. I'm convinced that we've planted a mistake there when somebody decided to add another +1 as well as we do here. Because all together it makes +2. It should take a treatment at the other place by eliminating the plus one, not here.

node/src/blockchain/blockchain_interface_utils.rs Outdated Show resolved Hide resolved
@@ -565,7 +459,7 @@ impl BlockchainBridge {
if start_block_number == u64::MAX {
start_block_number
} else {
start_block_number + 1u64 // TODO: GH-744 Way are we adding +1 can we just return the same value?
start_block_number + 1u64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I believe this is wrong. Careful here. But if you agree with me after I have explained you, do the cleanup.

@@ -1730,14 +1628,12 @@ mod tests {
received_payments,
&ReceivedPayments {
timestamp: received_payments.timestamp,
new_start_block: 8675309u64 + 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is wrong.
It should correspond exactly to the new_start_block in:

RetrievedBlockchainTransactions {
       new_start_block: 8675309u64,
       transactions: vec![BlockchainTransaction {
            block_number: 8675308u64,
            from: some_wallet.clone(),
            wei_amount: amount,
       }],
}

But you had to add one to make the assertion work and it only shows that the internal code is wrong. (We discussed the cause already. You will likely know by now how you should proceed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants