Skip to content

Commit

Permalink
Testnet DAA half life is 2 days, remove special case from BCHN
Browse files Browse the repository at this point in the history
Remove the DAA constructor testnet flag which is no longer used.

Test Plan:
  tox
  • Loading branch information
Fabcien authored and PiRK committed Nov 17, 2020
1 parent ccc2ec5 commit bf82557
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion electroncash/asert_daa.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ASERTDaa:
MTP_ACTIVATION_TIME = _get_asert_activation_mtp() # Normally Nov. 15th, 2020 UTC 12:00:00

IDEAL_BLOCK_TIME = 10 * 60 # 10 mins
HALF_LIFE = 2 * 24 * 3600 # for mainnet, testnet has 3600 (1 hour) half-life
HALF_LIFE = 2 * 24 * 3600
# Integer implementation uses these for fixed point math
RBITS = 16 # number of bits after the radix for fixed-point math
RADIX = 1 << RBITS
Expand Down
4 changes: 2 additions & 2 deletions electroncash/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MainNet(AbstractNet):

class TestNet(AbstractNet):
TESTNET = True
asert_daa = ASERTDaa(is_testnet=True)
asert_daa = ASERTDaa()
WIF_PREFIX = 0xef
ADDRTYPE_P2PKH = 111
ADDRTYPE_P2PKH_BITPAY = 111 # Unsure
Expand Down Expand Up @@ -144,7 +144,7 @@ class ScaleNet(TestNet):
GENESIS = "00000000e6453dc2dfe1ffa19023f86002eb11dbb8e87d0291a4599f0430be52"
TITLE = 'Electron Cash Scalenet'

asert_daa = ASERTDaa(is_testnet=False) # Despite being a "testnet", ScaleNet uses 2d half-life
asert_daa = ASERTDaa()

HEADERS_URL = "http://bitcoincash.com/files/scalenet_headers" # Unused

Expand Down

0 comments on commit bf82557

Please sign in to comment.