Commit 0e4bb572 authored by Levin Zimmermann's avatar Levin Zimmermann

NEO/py/storage: Ensure compression is always BOOL on the wire

Currently it can be:

- nil
- bool
- integer

In python this isn't really a problem due to '__bool__', but in Golang
we don't have this. Yes - it would be possible to make a parser in
Golang to decode all of these values as either True/False, but this is
much more complex than just adjusting python to send consistent data
types. It's also easier to describe a protocol where one parameter is
always 'bool' instead of having a parameter that is 'bool | int | NoneType'.
parent ccdfd363
......@@ -75,7 +75,7 @@ class ClientOperationHandler(BaseHandler):
checksum = ZERO_HASH
data = ''
p = Packets.AnswerObject(oid, serial, next_serial,
compression, checksum, data, data_serial)
bool(compression), checksum, data, data_serial)
conn.answer(p)
def askStoreTransaction(self, conn, ttid, *txn_info):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment