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

Bridge Pool CLI tests #865

Merged

Conversation

batconjurer
Copy link
Member

Adds E2E tests for the bridge pool cli. The test added checks that a transfer can be submitted to the pool and that when querying the pool, the submitted transfer is present.

Since the logic for signing bridge pool roots is not in place yet, a test for constructing proofs will be a later PR.

@batconjurer batconjurer requested review from sug0 and james-chf December 6, 2022 10:19
james-chf and others added 2 commits December 6, 2022 10:27
…enforced

Ensure minimum confirmations are enforced for pending Ethereum events
 Changed the bytes passed into merkle proof to be references
if pool_contents.is_empty() {
println!("Bridge pool is empty.");
} else {
println!("Bridge pool contents: ");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
println!("Bridge pool contents: ");
print!("Bridge pool contents: ");

nit: maybe this is the desired output here? Bridge pool contents: { ...

Copy link
Member Author

Choose a reason for hiding this comment

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

This I'm not sure about until I see it on the screen. Will get back to it when I have time.

Copy link
Member Author

Choose a reason for hiding this comment

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

It made the whole thing a json payload, which is what I really wanted anyway.

apps/src/lib/client/eth_bridge_pool.rs Show resolved Hide resolved
tests/src/e2e/eth_bridge_tests.rs Show resolved Hide resolved
Copy link
Contributor

@james-chf james-chf left a comment

Choose a reason for hiding this comment

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

I've just looked at eth_bridge_tests.rs and client/eth_bridge_pool.rs

tests/src/e2e/eth_bridge_tests.rs Outdated Show resolved Hide resolved
apps/src/lib/client/eth_bridge_pool.rs Outdated Show resolved Hide resolved
@batconjurer batconjurer requested review from james-chf and sug0 December 6, 2022 15:11
Copy link
Contributor

@james-chf james-chf left a comment

Choose a reason for hiding this comment

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

lgtm, formatting needs to be fixed for CI

wasm/checksums.json Outdated Show resolved Hide resolved
wasm/wasm_source/src/tx_bridge_pool.rs Outdated Show resolved Hide resolved
wasm/wasm_source/src/tx_bridge_pool.rs Outdated Show resolved Hide resolved
wasm/wasm_source/src/tx_bridge_pool.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@sug0 sug0 left a comment

Choose a reason for hiding this comment

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

run make fmt, otherwise lgtm!

@batconjurer batconjurer merged commit cb18e8b into eth-bridge-integration Dec 7, 2022
@batconjurer batconjurer deleted the bat/ethbridge/test-bridge-pool-cli branch December 7, 2022 10:11
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.

3 participants