forked from LBRYCommunity/lbry-sdk
travis yaml conslidation via anchors
This commit is contained in:
parent
91bf312e4d
commit
411b8c74cc
3 changed files with 18 additions and 30 deletions
34
.travis.yml
34
.travis.yml
|
@ -58,28 +58,8 @@ jobs:
|
||||||
target_paths:
|
target_paths:
|
||||||
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})/win/
|
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})/win/
|
||||||
|
|
||||||
- name: "Linux"
|
- &build
|
||||||
install:
|
name: "Linux"
|
||||||
- pip install pyinstaller
|
|
||||||
- pip install git+https://github.com/lbryio/torba.git
|
|
||||||
- pip install git+https://github.com/lbryio/lbryschema.git
|
|
||||||
- pip install -e .
|
|
||||||
script:
|
|
||||||
- pyinstaller -F -n lbrynet lbrynet/cli.py
|
|
||||||
- ./dist/lbrynet --version
|
|
||||||
addons:
|
|
||||||
artifacts:
|
|
||||||
working_dir: dist
|
|
||||||
paths:
|
|
||||||
- lbrynet
|
|
||||||
# artifact uploader thinks lbrynet is a directory, https://github.com/travis-ci/artifacts/issues/78
|
|
||||||
target_paths:
|
|
||||||
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})/linux/lbrynet
|
|
||||||
|
|
||||||
- name: "Mac"
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode9.4
|
|
||||||
language: generic
|
|
||||||
install:
|
install:
|
||||||
- pip3 install pyinstaller
|
- pip3 install pyinstaller
|
||||||
- pip3 install git+https://github.com/lbryio/torba.git
|
- pip3 install git+https://github.com/lbryio/torba.git
|
||||||
|
@ -88,6 +68,7 @@ jobs:
|
||||||
script:
|
script:
|
||||||
- pyinstaller -F -n lbrynet lbrynet/cli.py
|
- pyinstaller -F -n lbrynet lbrynet/cli.py
|
||||||
- ./dist/lbrynet --version
|
- ./dist/lbrynet --version
|
||||||
|
env: OS=linux
|
||||||
addons:
|
addons:
|
||||||
artifacts:
|
artifacts:
|
||||||
working_dir: dist
|
working_dir: dist
|
||||||
|
@ -95,7 +76,14 @@ jobs:
|
||||||
- lbrynet
|
- lbrynet
|
||||||
# artifact uploader thinks lbrynet is a directory, https://github.com/travis-ci/artifacts/issues/78
|
# artifact uploader thinks lbrynet is a directory, https://github.com/travis-ci/artifacts/issues/78
|
||||||
target_paths:
|
target_paths:
|
||||||
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})/mac/lbrynet
|
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})/${OS}/lbrynet
|
||||||
|
|
||||||
|
- <<: *build
|
||||||
|
name: "Mac"
|
||||||
|
os: osx
|
||||||
|
osx_image: xcode9.4
|
||||||
|
language: generic
|
||||||
|
env: OS=mac
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
|
|
|
@ -90,13 +90,13 @@ class Headers(BaseHeaders):
|
||||||
|
|
||||||
# Retarget
|
# Retarget
|
||||||
bnPowLimit = _ArithUint256(self.ledger.max_target)
|
bnPowLimit = _ArithUint256(self.ledger.max_target)
|
||||||
bnNew = _ArithUint256.SetCompact(last['bits'])
|
bnNew = _ArithUint256.set_compact(last['bits'])
|
||||||
bnNew *= nModulatedTimespan
|
bnNew *= nModulatedTimespan
|
||||||
bnNew //= nModulatedTimespan
|
bnNew //= nModulatedTimespan
|
||||||
if bnNew > bnPowLimit:
|
if bnNew > bnPowLimit:
|
||||||
bnNew = bnPowLimit
|
bnNew = bnPowLimit
|
||||||
|
|
||||||
return bnNew.GetCompact(), bnNew._value
|
return bnNew.get_compact(), bnNew._value
|
||||||
|
|
||||||
|
|
||||||
class MainNetLedger(BaseLedger):
|
class MainNetLedger(BaseLedger):
|
||||||
|
|
|
@ -3,16 +3,16 @@ import json
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from torba.manager import WalletManager as BaseWalletManager
|
from torba.basemanager import BaseWalletManager
|
||||||
|
|
||||||
from lbryschema.uri import parse_lbry_uri
|
from lbryschema.uri import parse_lbry_uri
|
||||||
from lbryschema.error import URIParseError
|
from lbryschema.error import URIParseError
|
||||||
from lbryschema.claim import ClaimDict
|
from lbryschema.claim import ClaimDict
|
||||||
|
|
||||||
from .ledger import MainNetLedger # pylint: disable=unused-import
|
from .ledger import MainNetLedger
|
||||||
from .account import generate_certificate
|
from .account import generate_certificate
|
||||||
from .transaction import Transaction
|
from .transaction import Transaction
|
||||||
from .database import WalletDatabase # pylint: disable=unused-import
|
from .database import WalletDatabase
|
||||||
|
|
||||||
|
|
||||||
class BackwardsCompatibleNetwork:
|
class BackwardsCompatibleNetwork:
|
||||||
|
@ -31,11 +31,11 @@ class BackwardsCompatibleNetwork:
|
||||||
class LbryWalletManager(BaseWalletManager):
|
class LbryWalletManager(BaseWalletManager):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ledger(self): # type: () -> MainNetLedger
|
def ledger(self) -> MainNetLedger:
|
||||||
return self.default_account.ledger
|
return self.default_account.ledger
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def db(self): # type: () -> WalletDatabase
|
def db(self) -> WalletDatabase:
|
||||||
return self.ledger.db
|
return self.ledger.db
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in a new issue