Commit Graph

7 Commits

Author SHA1 Message Date
Dave Collins
fc54d98b1e
multi: Remove a bunch of dup words in comments. 2023-08-23 14:13:51 -05:00
Dave Collins
1961854e1e
stdaddr: Limit v0 addr decode to max possible size.
This modifies DecodeAddressV0 to reject any attempts to decode strings
that are larger than the max possible size early since there is no
reason to waste time and memory doing the base 58 decode when it is
guaranteed to be invalid anyway.

It also adds an associated test to ensure proper functionality.
2022-01-01 03:09:11 -06:00
Dave Collins
c0fe15fa0e
stdaddr: Use txscript for opcode definitions.
This modifies the code to use the opcode definitions in txscript now
that the previous cyclic dependency no longer applies since txscript no
longer depends on stdaddr.
2021-11-18 13:15:06 -06:00
Donald Adu-Poku
0c11ab5bd9 multi: avoid using subscriber lifecycle in catchup.
This updates the index subscriber catchup function to update
subscriptions directly with notification instead of going through the
Run lifecycle process which avoids a case of receiving out of sync
index notifications while catch up is in progress.

Multiple typos in error type tests and review issues have also been
fixed in this commit.
2021-10-12 18:52:50 -05:00
Josh Rickmar
96b98390a9 stdaddr: Replace Address method with String
An address is conceptually a human-readable string encoding of a
payment script, so the two methods String and PaymentScript should be
sufficient to provide basic address functionality.  This also avoids
some stutter/repetition (e.g. ma.Address().Address()) in wallet code,
where wrapper types are used around the Address interface, and
additionally allows the wrapper types to implement the stdaddr.Address
interface directly while still providing their own Address method to
return the underlying interface type.
2021-04-15 16:51:33 -05:00
Dave Collins
a2366e6e0b
stdaddr: Accept vote and revoke limits separately.
This modifies the RewardCommitmentScript method of the StakeAddress
interface to accept the vote and revoke fee limits separately instead of
expecting the caller to have already encoded it properly.

This simplifies the creation of the reward commitment script since there
is not currently any other method available anywhere to independently
encode the limits properly and it is not a particularly trivial
encoding.

Finally, the tests and example are updated accordingly.
2021-03-30 01:59:44 -05:00
Dave Collins
37e4569917
stdaddr: Move from internal/staging to txscript.
This moves the new stdaddr package from the internal staging area to the
txscript module and updates the relevant paths and package README.md
accordingly.
2021-03-30 01:43:48 -05:00