-
Notifications
You must be signed in to change notification settings - Fork 188
Conversation
Merge CoZ Development into jseagrave21 Development
Merge CoZ Development into jseagrave21 Development
Merge CoZ Development into jseagrave21 Development
* Update ExtendedJsonRpcApi.py - add fix provided by @localhuman so original methods are returned as well as extended methods
…yOfZion#661) * Add the option -u (unittest-net) to prompt.py * Add unittest guildeline and add the smart contract source codes (UnitTest-SM.zip) to the fixtures package
for compatibility
* Fix ExtendedJsonRpcApi (CityOfZion#662) * Update ExtendedJsonRpcApi.py - add fix provided by @localhuman so original methods are returned as well as extended methods * Mute expected test stacktrace and clearly identify why an exception is thrown. (CityOfZion#663) * Add guideline for adding tests to the neo-privnet-unittest image (CityOfZion#661) * Add the option -u (unittest-net) to prompt.py * Add unittest guildeline and add the smart contract source codes (UnitTest-SM.zip) to the fixtures package * Add raw transaction building examples (CityOfZion#665) * Update neo-boa version to fix core building test
Merge CoZ Development into jseagrave21 Development
Merge CoZ Development into jseagrave21 Development
Merge CoZ Development into jseagrave21 Development
Merge CoZ Development into jseagrave21 development
Merge CoZ development into jseagrave21 development
- add tests for "showallaccounts" and "showallaccountstates"
Merge neo-python development into jseagrave21 development
Merge neo-python development into jseagrave21 development
Merge neo-python development into jseagrave21 development
Merge CoZ development into jseagrave21 development
Gracefully handle NEP-5 balance query failures (CityOfZion#744)
Merge CoZ development into neo-python development
Merge CoZ development into jseagrave21 development
Merge CoZ Development into jseagrave21 development
Merge CoZ/neo-python development into jseagrave21/neo-python development
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The made changes all look good and tests pass if I pull your neo-python-core
version. A couple of improvements that we can do (needs CityOfZion/neo-python-core#169 (review))
- this can now throw a
ValueError
neo-python/neo/SmartContract/ContractParameterContext.py
Lines 168 to 171 in fe90f62
while reader.ReadUInt8() == 33: ecpoint = ecdsa.ec.decode_from_hex(binascii.hexlify(reader.ReadBytes(33)).decode()) points.append(ecpoint) ms.close()
Please update to
try:
while reader.ReadUInt8() == 33:
ecpoint = ecdsa.ec.decode_from_hex(binascii.hexlify(reader.ReadBytes(33)).decode())
points.append(ecpoint)
except ValueError:
return False
finally:
ms.close()
neo-python/neo/Prompt/Utils.py
Line 329 in fe90f62
return ECDSA.decode_secp256r1(result).G, False
replace with
try:
return ECDSA.decode_secp256r1(result).G, False
except ValueError:
return None, True
-
neo-python/neo/Prompt/Commands/Invoke.py
Line 652 in fe90f62
pubkey = ECDSA.decode_secp256r1(items[0]).G
update to captureValueError
and inform user that their public key is invalid -
neo-python/neo/SmartContract/StateMachine.py
Line 149 in fe90f62
owner = ECDSA.decode_secp256r1(ownerData, unhex=False).G
update to captureValueError
and return False -
neo-python/neo/SmartContract/StateReader.py
Line 349 in fe90f62
point = ECDSA.decode_secp256r1(hashOrPubkey, unhex=False).G
update to captureValueError
and return False
Note: I skipped the calls in the Blockchain
, Contract
, ContractParameter
classes on purpose as they already have undefined behaviour. I don't have the time to investigate them now and apparently they've worked fine up to now. The above requests have a clear way of dealing with them
2 small requests;
Before Line 24 in fe90f62
After
|
8b7ee33
to
d1261a1
Compare
💪 |
200 points jseagrave |
What current issue(s) does this address, or what feature is it adding?
Supports CityOfZion/neo-python-core#169 which addresses #888.
How did you solve this problem?
See CityOfZion/neo-python-core#169
How did you make sure your solution works?
make test
Are there any special changes in the code that we should be aware of?
No
Please check the following, if applicable:
make lint
?make test
?CHANGELOG.rst
? (if not, please do)