1
0

wallet: introduce namedtuples TxMinedStatus and VerifiedTxInfo

This commit is contained in:
SomberNight
2018-07-31 16:49:57 +02:00
parent 41e088693d
commit a29e2218c8
8 changed files with 79 additions and 58 deletions

View File

@@ -23,6 +23,7 @@
import binascii
import os, sys, re, json
from collections import defaultdict
from typing import NamedTuple
from datetime import datetime
import decimal
from decimal import Decimal
@@ -903,3 +904,13 @@ def make_dir(path, allow_symlink=True):
raise Exception('Dangling link: ' + path)
os.mkdir(path)
os.chmod(path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
TxMinedStatus = NamedTuple("TxMinedStatus", [("height", int),
("conf", int),
("timestamp", int),
("header_hash", str)])
VerifiedTxInfo = NamedTuple("VerifiedTxInfo", [("height", int),
("timestamp", int),
("txpos", int),
("header_hash", str)])