-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add the new field Expiry. #55
base: master
Are you sure you want to change the base?
Conversation
@GylmarGonzalez There's no need to open new PRs every time there's some code you need to change, it creates spam and confusion. Please go back to what was already clarified in #54 and check the provided info again. |
Hi the #54 its closed. Its my two last commit, was here in this PR. |
Still please don't open new PRs from now on, let's use this.
Not sure what you are trying to say. Anyway I still don't see the changes that I described in #54 (comment) (the |
Ok I used this PR, I check the observation. Thanks. |
Hi. I see the instruccion I modify the file src/database/entities/batch_transfer.rs |
Great. Now you need to edit the code until it builds, to do that you will need to implement the feature described in #37 |
ok,thank you for your patience. I see the instruction on : Exactly this text:
I have a question , this explanation it for test the change after to do the change in code ? or this explanation it for do the change in code ? Thanks. |
This explanation is to make existing tests build and to add new ones to test the new functionality. For now you can just try to make the code build again and then move on to the tests (unless you want to use a TDD approach). |
Understood, do you have any documentation or any idea about the change because the original explanation is general, blind_receive and witness_receive I need agregate the bool parameter, I found the funtion in many file, Could you tell me how to proceed? Thanks. |
The original explanation is not that general, it assumes that the developer has familiarity with Rust.
You need to start from the public functions. You will find those functions calls in several files but their definitions in a single file ( |
In my case, I have never worked with Rust, that is why my learning curve is difficult,but I will try to fix it I Read the explanation and I have a few question.
I take your recommendation, start from the public functions (src/wallet/offline.rs) I located the funtions (blind_receive and witness_receive), but I understand I save some information in database, expecificaly the new field, the action would be a insert or update ? I know I will use sea orm to do this task. I have not found this method _handle_expired_transfers. I understand this API fail_transfers I must change with the same process from the previous point. I appreciate that you can clarify my doubts |
A transfer is expired when it's still in the
At insert time. When
This will contain the expiration time (which is already calculated as
This method has been removed. The logic has been moved to the Lines 907 to 925 in 203e41e
|
ok , I see you last comment, and I try the modify the method blind_receive src/wallet/offline.rs. `
` But I don't know if I'm doing it correctly. |
No. Please re-read carefully the issue description and my previous messages. The expiration is already implemented, you just need to add an Also please when you need feedback on code changes push them instead of writing them in a message. |
Yes, thanks for the comment and for all your help. I will try to send the idea of the change in a commit. I hope to make my last attempt tonight (San Salvador time). Tomorrow, December 20th, is the deadline. |
Modify :
M migration/src/m20230608_071249_init_db.rs
M src/wallet/offline.rs
I only add the new field.
The files that were modified after the creation of the database, their changes were reverted with git
When I try to build the app I obtain this error.
error[E0609]: no field
ExactExpiry
on typedatabase::TransferData
--> src/wallet/offline.rs:1034:60
|
1034 | expiration: td.expiration.map(|e| Some((e, td.ExactExpiry.unwrap()))),
| ^^^^^^^^^^^ unknown field
|
= note: available fields are:
kind
,status
,batch_transfer_idx
,txid
,receive_utxo
... and 4 others