mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
pylightning: adds Millisatoshi __radd__ method for sum()
This commit is contained in:
committed by
Christian Decker
parent
0e2ec27576
commit
c0069d8944
@@ -157,6 +157,9 @@ class Millisatoshi:
|
|||||||
def __mod__(self, other):
|
def __mod__(self, other):
|
||||||
return Millisatoshi(int(self) % other)
|
return Millisatoshi(int(self) % other)
|
||||||
|
|
||||||
|
def __radd__(self, other):
|
||||||
|
return Millisatoshi(int(self) + int(other))
|
||||||
|
|
||||||
|
|
||||||
class UnixDomainSocketRpc(object):
|
class UnixDomainSocketRpc(object):
|
||||||
def __init__(self, socket_path, executor=None, logger=logging, encoder_cls=json.JSONEncoder, decoder=json.JSONDecoder()):
|
def __init__(self, socket_path, executor=None, logger=logging, encoder_cls=json.JSONEncoder, decoder=json.JSONDecoder()):
|
||||||
|
|||||||
Reference in New Issue
Block a user