Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
merge from master
Browse files Browse the repository at this point in the history
  • Loading branch information
localhuman committed Oct 2, 2017
2 parents bc407f7 + 7a98b47 commit 0b55459
Show file tree
Hide file tree
Showing 14 changed files with 224 additions and 274 deletions.
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

19 changes: 19 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2017 Ethan Fast and CoZ

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,10 @@ coverage report -m --omit=venv/*

## License

- Open-source [Apache 2.0](https://github.com/CityOfZion/neo-python/blob/master/LICENSE).
- Open-source [MIT](https://github.com/CityOfZion/neo-python/blob/master/LICENSE.md).
- Main author is [@localhuman](https://github.com/localhuman).


## Donations

Accepted at __ATEMNPSjRVvsXmaJW4ZYJBSVuJ6uR2mjQU__
8 changes: 6 additions & 2 deletions neo/BigInteger.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ def Equals(self, other):
return super(BigInteger, self).__eq__(other)

def ToByteArray(self, signed=True):
return self.to_bytes((self.bit_length() + 7) //8, byteorder='little', signed=signed)

try:
return self.to_bytes((self.bit_length() + 7) //8, byteorder='little', signed=signed)
except OverflowError:
return self.to_bytes((self.bit_length() + 7) //8, byteorder='little', signed=False)
except Exception:
print("COULD NOT CONVERT %s to byte array" % self)

def __abs__(self, *args, **kwargs): # real signature unknown
return BigInteger(super(BigInteger, self).__abs__(*args, **kwargs))
Expand Down
5 changes: 5 additions & 0 deletions neo/Fixed8.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def __init__(self, number):
self.value = number


def GetData(self):
return self.value


@staticmethod
def FromDecimal(number):
Expand Down Expand Up @@ -115,5 +118,7 @@ def __ge__(self, other):
def __le__(self, other):
return self.value <= other.value

def ToString(self):
return self.value / Fixed8.D
# def __str__(self):
# return self.value
6 changes: 1 addition & 5 deletions neo/Implementations/Blockchains/LevelDB/LevelDBBlockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,11 +655,7 @@ def Persist(self, block):


except Exception as e:
print("COULD NOT EXECUTE %s " % e)
# self.__log.debug("could not execute %s " % e)
# traceback.print_stack()
# traceback.print_exc()
print("EXECUTION FAILLLLLLLLLLLLLLEDDDDDD")
print("[neo.Implementations.Blockchains.LevelDBBlockchain.PersistBlock: engine execute result] Could not execute smart contract. See logs for more details. %s " % e)
else:

if tx.Type != b'\x00' and tx.Type != 128:
Expand Down
Loading

0 comments on commit 0b55459

Please sign in to comment.