Skip to content

Conversation

@lla-dane
Copy link
Contributor

@lla-dane lla-dane commented Jun 2, 2024

Aims to resolve #88

Added some basic unit tests for floresta-chain and address_man(p2p-wire) in floresta-wire.

@lla-dane
Copy link
Contributor Author

lla-dane commented Jun 7, 2024

Added unit tests for watch-only and refactored the tests in floresta-chain and wire as suggested.

@lla-dane
Copy link
Contributor Author

lla-dane commented Jun 7, 2024

Updated cache_transaction in floresta-watch-only/src/lib.rs for a potential bug. In this function as we cache a new address in the db, the components of the CacheAddress should be empty.

If not, then the same components: balance and utxos related to that script_hash gets pushed again in save_non_mempool_tx, resulting in the balance associated with that sript_hash beccoming twice as much.

@lla-dane
Copy link
Contributor Author

@Davidson-Souza, please approval the workflows to run, so I can see if they are failing.

@Davidson-Souza
Copy link
Member

@lla-dane done!

@lla-dane
Copy link
Contributor Author

@Davidson-Souza, please approve once more, clippy won't bug this time, probably.

@lla-dane
Copy link
Contributor Author

Finally, all the checks passed, @Davidson-Souza please review it, and suggest if I have to change something.

@lla-dane lla-dane changed the title Unit tests for floresta_chain and floresta_wire. Unit tests for floresta-chain, floresta-watch-only and functional tests for floresta-electrum. Jun 21, 2024
@jaoleal
Copy link
Collaborator

jaoleal commented Jun 21, 2024

@lla-dane you can run

$ cargo +nightly clippy --all-targets

the same command that actions run in the virtual machine, you can check this at the actions details.

on your local project, with this you have the same feedback than actions without the need to push it to verify.
Nice work that youre doing!

@lla-dane
Copy link
Contributor Author

lla-dane commented Jun 21, 2024

@lla-dane you can run

$ cargo +nightly clippy --all-targets

the same command that actions run in the virtual machine, you can check this at the actions details.

on your local project, with this you have the same feedback than actions without the need to push it to verify. Nice work that youre doing!

yeah that's the thing!, ran that command on my end many times, didn't gave any errors, even ran all the CI checks on my fork too, for some reason they were passing on my fork, but failing on the PR by compilation errors, it was really weird :|

@Davidson-Souza
Copy link
Member

@lla-dane could you please squash some commits? like 15d6c13 can be squashed on 1a5750d and everything after 5abb90c could be squashed on this commit

* Unit tests for floresta-watch-only
* Functional tests for floresta-electrum: Simulated a client and sent all kinds requests to the server and verified the responses
@lla-dane
Copy link
Contributor Author

lla-dane commented Jun 21, 2024

All commits are squashed into one. I guess some commits included in some previous PRs which got included when I synced my fork, also got squashed in this,

@Davidson-Souza
Copy link
Member

It is showing diff for stuff that changed on master, if you rebase that will go away.

@lla-dane
Copy link
Contributor Author

@Davidson-Souza is this PR ready for merge ?

@Davidson-Souza
Copy link
Member

I've left a few minor comments, shouldn't take more than a few minutes to fix. Then I think it's ready to merge.

@lla-dane
Copy link
Contributor Author

lla-dane commented Jun 25, 2024

I've left a few minor comments, shouldn't take more than a few minutes to fix. Then I think it's ready to merge.

Its not showing any unresolved comments here, those that were there before are fixed already I think. Are there any new ones?

@Davidson-Souza
Copy link
Member

Its not showing any unresolved comments here, those that were there before are fixed already I think. Are there any new ones?

Sorry, I forgot to submit

@lla-dane
Copy link
Contributor Author

@Davidson-Souza done!

@Davidson-Souza Davidson-Souza merged commit 4bc9dfb into vinteumorg:master Jun 25, 2024
jaoleal pushed a commit to jaoleal/Floresta that referenced this pull request Jul 2, 2024
…ts for floresta-electrum. (vinteumorg#168)

* * Unit tests for floretsa-chain
* Unit tests for floresta-watch-only
* Functional tests for floresta-electrum: Simulated a client and sent all kinds requests to the server and verified the responses
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.

Integration and unit tests

3 participants