Browse Source
Add contextual comment for GetValueOut() and GetShieldedValueIn()
pull/4/head
Jack Grigg
6 years ago
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with
11 additions and
0 deletions
-
src/primitives/transaction.h
|
|
@ -651,6 +651,17 @@ public: |
|
|
|
return header; |
|
|
|
} |
|
|
|
|
|
|
|
/*
|
|
|
|
* Context for the two methods below: |
|
|
|
* As at most one of vpub_new and vpub_old is non-zero in every JoinSplit, |
|
|
|
* we can think of a JoinSplit as an input or output according to which one |
|
|
|
* it is (e.g. if vpub_new is non-zero the joinSplit is "giving value" to |
|
|
|
* the outputs in the transaction). Similarly, we can think of the Sapling |
|
|
|
* shielded part of the transaction as an input or output according to |
|
|
|
* whether valueBalance - the sum of shielded input values minus the sum of |
|
|
|
* shielded output values - is positive or negative. |
|
|
|
*/ |
|
|
|
|
|
|
|
// Return sum of txouts, (negative valueBalance or zero) and JoinSplit vpub_old.
|
|
|
|
CAmount GetValueOut() const; |
|
|
|
// GetValueIn() is a method on CCoinsViewCache, because
|
|
|
|