Casual Alice with Policy and Payment Defaults#984
Conversation
7ba150a to
b6ba1ff
Compare
Codecov Report
@@ Coverage Diff @@
## master #984 +/- ##
=========================================
- Coverage 83.19% 79.89% -3.3%
=========================================
Files 67 67
Lines 8663 8754 +91
=========================================
- Hits 7207 6994 -213
- Misses 1456 1760 +304
Continue to review full report at Codecov.
|
|
Two questions:
|
…CLI init command.
Co-Authored-By: David Núñez <david@nucypher.com> Co-Authored-By: Derek Pierre <derek.pierre@gmail.com>
…r#1015 - BlockchainPolicy value must be greater than 0.
…roves depth of reward collection integration testing
| # "Formal Geth" - Manual Web3 Provider, We assume is already running and available | ||
| else: | ||
| self.connect_to_blockchain() | ||
| if not self.blockchain.interface.client.accounts: |
| def is_staking(self) -> bool: | ||
| """Checks if this Miner currently has active stakes / locked tokens.""" | ||
| return bool(self.locked_tokens > NU.ZERO()) | ||
| return bool(self.stakes) |
There was a problem hiding this comment.
Just curious: why bool(self.stakes) is the response here? What's the underlying logic?
There was a problem hiding this comment.
self.__read_stakes() # "load-in": Read on-chain stakes "syncs" the onchain stakes into the local staking cache on Staker, and self.stakes will be set to NO_STAKES.bool_value(False) if there are no active stakes.
| class AliceSpecification(CharacterSpecification): | ||
|
|
||
| __create_policy = (('bob_encrypting_key', 'bob_verifying_key', 'm', 'n', 'label'), # In | ||
| __create_policy = (('bob_encrypting_key', 'bob_verifying_key', 'm', 'n', 'label', 'expiration'), # In |
There was a problem hiding this comment.
How can we handle conditionally-required inputs in specifications? In this case, value is mandatory when not federated. Seems kind of tricky to do it.
There was a problem hiding this comment.
Good eye! I've been thinking about this too, I think it's possible to allow values to be passed as None all the way into character, with some modification to specification handling seen here.
Co-Authored-By: David Núñez <david@nucypher.com> Co-Authored-By: Derek Pierre <derek.pierre@gmail.com>
Casual Alice with Policy and Payment Defaults
Casual Alice with Policy and Payment Defaults
What this does
AliceConfiguration--geth)test_cli_lifecycletestchecksum_public_address->checksum_addressAgencymetaclass (makes agent subclasses singletons)Examples
Fixes #975
Fixes #1015