zingolabs / zingolib_original

ZingoLib
MIT License
1 stars 1 forks source link

Insert into td #57

Closed zancas closed 2 years ago

zancas commented 2 years ago

The self.td.sapling_bundle() returns an immutable ref, but self.td itself is pub.

So the hack:

  1. Grab the original immutable bundle by ref.
  2. clone it to a mut var
  3. Inject the new value into into a new TransactionData (by constructing it)
  4. Bind that fresh td to the pub self.td field. g. profit
codecov-commenter commented 2 years ago

Codecov Report

Merging #57 (0883e0d) into dev (27254c8) will decrease coverage by 0.22%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##              dev      #57      +/-   ##
==========================================
- Coverage   33.41%   33.18%   -0.23%     
==========================================
  Files          30       30              
  Lines        5632     5671      +39     
==========================================
  Hits         1882     1882              
- Misses       3750     3789      +39     
Impacted Files Coverage Δ
lib/src/blaze/test_utils.rs 23.69% <0.00%> (-4.41%) :arrow_down:
lib/src/lightclient/tests.rs 93.81% <ø> (ø)
lib/src/lightwallet.rs 17.45% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 27254c8...0883e0d. Read the comment docs.

zancas commented 2 years ago

@AloeareV since you requested the change, I think that you have to re-review before this is mergeable.