diff --git a/README.md b/README.md index e61885f..d1947ed 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -# Particl Atomic Swap - Proof of concept +# Simple Atomic Swap Network - Proof of Concept + +[![Build Status](https://travis-ci.org/tecnovert/basicswap.svg?branch=master)](https://travis-ci.org/tecnovert/basicswap) ## Overview diff --git a/basicswap/basicswap.py b/basicswap/basicswap.py index f3b69ea..6d4e1e4 100644 --- a/basicswap/basicswap.py +++ b/basicswap/basicswap.py @@ -19,6 +19,7 @@ import sqlalchemy as sa from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy.ext.declarative import declarative_base from enum import IntEnum, auto + from . import __version__ from .util import ( COIN, @@ -33,18 +34,15 @@ from .util import ( toWIF, getKeyID, ) - from .chainparams import ( chainparams, Coins, ) - from .messages_pb2 import ( OfferMessage, BidMessage, BidAcceptMessage, ) - import basicswap.config as cfg import basicswap.segwit_addr as segwit_addr @@ -132,7 +130,7 @@ ABS_LOCK_TIME = 4 SEQUENCE_LOCKTIME_GRANULARITY = 9 # 512 seconds SEQUENCE_LOCKTIME_TYPE_FLAG = (1 << 22) SEQUENCE_LOCKTIME_MASK = 0x0000ffff -INITIATE_TX_TIMEOUT = 30 * 60 +INITIATE_TX_TIMEOUT = 40 * 60 # TODO: make variable per coin def getOfferState(state): diff --git a/basicswap/http_server.py b/basicswap/http_server.py index ac9f99a..efd2a69 100644 --- a/basicswap/http_server.py +++ b/basicswap/http_server.py @@ -15,6 +15,7 @@ import urllib.parse from http.server import BaseHTTPRequestHandler, HTTPServer from jinja2 import Environment, FileSystemLoader +from . import __version__ from .util import ( COIN, format8, @@ -35,7 +36,7 @@ from .basicswap import ( ABS_LOCK_TIME, ) -file_loader = FileSystemLoader('templates') +file_loader = FileSystemLoader('basicswap/templates') env = Environment(loader=file_loader) @@ -487,6 +488,7 @@ class HttpHandler(BaseHTTPRequestHandler): title=self.server.title, refresh=30, h2=self.server.title, + version=__version__, summary=summary ), 'UTF-8') diff --git a/templates/active.html b/basicswap/templates/active.html similarity index 100% rename from templates/active.html rename to basicswap/templates/active.html diff --git a/templates/advance.html b/basicswap/templates/advance.html similarity index 100% rename from templates/advance.html rename to basicswap/templates/advance.html diff --git a/templates/header.html b/basicswap/templates/header.html similarity index 100% rename from templates/header.html rename to basicswap/templates/header.html diff --git a/templates/index.html b/basicswap/templates/index.html similarity index 95% rename from templates/index.html rename to basicswap/templates/index.html index eb38f84..3f05048 100644 --- a/templates/index.html +++ b/basicswap/templates/index.html @@ -6,6 +6,9 @@ {% if refresh %} Page Refresh: {{ refresh }} seconds
{% endif %} +Version: {{ version }} +

+

Swaps in progress: {{ summary.num_swapping }}
Network Offers: {{ summary.num_network_offers }}
Sent Offers: {{ summary.num_sent_offers }}
diff --git a/templates/watched.html b/basicswap/templates/watched.html similarity index 100% rename from templates/watched.html rename to basicswap/templates/watched.html diff --git a/docker/coindata/basicswap/basicswap.json b/docker/coindata/basicswap/basicswap.json index 8b18f3c..32efb6e 100644 --- a/docker/coindata/basicswap/basicswap.json +++ b/docker/coindata/basicswap/basicswap.json @@ -22,14 +22,6 @@ "bindir": "/opt/bin/litecoin", "use_segwit": true, "blocks_confirmed": 2 - }, - "bitcoin": { - "connection_type": "none", - "manage_daemon": false, - "rpcport": 19796, - "datadir": "/coindata/bitcoin", - "bindir": "/coindata/bin/bitcoin", - "use_segwit": true } }, "check_progress_seconds": 60,