Commit c1c26894 authored by Julien Muchembled's avatar Julien Muchembled

storage: show whether transaction is voted in its __repr__

parent 5e7f34d2
...@@ -61,10 +61,11 @@ class Transaction(object): ...@@ -61,10 +61,11 @@ class Transaction(object):
return set() return set()
def __repr__(self): def __repr__(self):
return "<%s(%s, tid=%s, age=%.2fs) at 0x%x>" % ( return "<%s(%s, %s, age=%.2fs) at 0x%x>" % (
self.__class__.__name__, self.__class__.__name__,
uuid_str(self.uuid), uuid_str(self.uuid),
dump(self.tid), 'tid=' + dump(self.tid) if self.tid else
'voted' if self.voted else 'not voted',
time() - self._birth, time() - self._birth,
id(self)) id(self))
......
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