@@ -24,7 +24,7 @@ def tx(self, secret_key, hex=False):
2424 header_fmt ,
2525 buf ,
2626 0 ,
27- kwargs [ "network_id" ],
27+ 0 , # network_id field doesn't use anymore but place is reserved with value 0
2828 kwargs ["protocol_version" ],
2929 kwargs ["message_id" ],
3030 kwargs ["service_id" ],
@@ -43,13 +43,12 @@ def tx(self, secret_key, hex=False):
4343
4444
4545class transactions (object ):
46- def __init__ (self , service_id = - 1 , protocol_version = 0 , network_id = 0 ):
46+ def __init__ (self , service_id = - 1 , protocol_version = 0 ):
4747 if service_id < 0 :
4848 raise IllegalServiceId ()
4949
5050 self .service_id = service_id
5151 self .protocol_version = protocol_version
52- self .network_id = network_id
5352 self .tx = []
5453
5554 @staticmethod
@@ -69,7 +68,7 @@ def __call__(self, cls):
6968 class Tx (tx_cls ):
7069 def __init__ (tx_self , * args , ** kwargs ):
7170 if "message_id" not in kwargs :
72- kwargs ["network_id" ] = self . network_id
71+ kwargs ["network_id" ] = 0 # network_id field doesn't use anymore but place is reserved with value 0
7372 kwargs ["protocol_version" ] = self .protocol_version
7473 kwargs ["message_id" ] = message_id
7574 kwargs ["service_id" ] = self .service_id
@@ -96,7 +95,7 @@ def tx(self, secret_key, hex=False):
9695 k : v for k , v in plain .items () if k not in meta_fields
9796 }
9897 del message ["payload_sz" ]
99- del message ["network_id" ] # Redundant field in JSON
98+ del message ["network_id" ] # network_id field doesn't use anymore in JSON
10099 return message
101100
102101 def hash (self , secret_key ):
0 commit comments