Add travis build status to readme.

Move templates dir.
Add version to index.
Remove bitcoin config from docker json config - extra coins can be enabled with
prepare -addcoin.
This commit is contained in:
tecnovert 2019-07-26 12:07:25 +02:00
parent 267ff02d3f
commit 1ce87bb58d
No known key found for this signature in database
GPG Key ID: 8ED6D8750C4E3F93
9 changed files with 11 additions and 14 deletions

View File

@ -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 ## Overview

View File

@ -19,6 +19,7 @@ import sqlalchemy as sa
from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.declarative import declarative_base
from enum import IntEnum, auto from enum import IntEnum, auto
from . import __version__ from . import __version__
from .util import ( from .util import (
COIN, COIN,
@ -33,18 +34,15 @@ from .util import (
toWIF, toWIF,
getKeyID, getKeyID,
) )
from .chainparams import ( from .chainparams import (
chainparams, chainparams,
Coins, Coins,
) )
from .messages_pb2 import ( from .messages_pb2 import (
OfferMessage, OfferMessage,
BidMessage, BidMessage,
BidAcceptMessage, BidAcceptMessage,
) )
import basicswap.config as cfg import basicswap.config as cfg
import basicswap.segwit_addr as segwit_addr import basicswap.segwit_addr as segwit_addr
@ -132,7 +130,7 @@ ABS_LOCK_TIME = 4
SEQUENCE_LOCKTIME_GRANULARITY = 9 # 512 seconds SEQUENCE_LOCKTIME_GRANULARITY = 9 # 512 seconds
SEQUENCE_LOCKTIME_TYPE_FLAG = (1 << 22) SEQUENCE_LOCKTIME_TYPE_FLAG = (1 << 22)
SEQUENCE_LOCKTIME_MASK = 0x0000ffff SEQUENCE_LOCKTIME_MASK = 0x0000ffff
INITIATE_TX_TIMEOUT = 30 * 60 INITIATE_TX_TIMEOUT = 40 * 60 # TODO: make variable per coin
def getOfferState(state): def getOfferState(state):

View File

@ -15,6 +15,7 @@ import urllib.parse
from http.server import BaseHTTPRequestHandler, HTTPServer from http.server import BaseHTTPRequestHandler, HTTPServer
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader
from . import __version__
from .util import ( from .util import (
COIN, COIN,
format8, format8,
@ -35,7 +36,7 @@ from .basicswap import (
ABS_LOCK_TIME, ABS_LOCK_TIME,
) )
file_loader = FileSystemLoader('templates') file_loader = FileSystemLoader('basicswap/templates')
env = Environment(loader=file_loader) env = Environment(loader=file_loader)
@ -487,6 +488,7 @@ class HttpHandler(BaseHTTPRequestHandler):
title=self.server.title, title=self.server.title,
refresh=30, refresh=30,
h2=self.server.title, h2=self.server.title,
version=__version__,
summary=summary summary=summary
), 'UTF-8') ), 'UTF-8')

View File

@ -6,6 +6,9 @@
{% if refresh %} {% if refresh %}
Page Refresh: {{ refresh }} seconds<br/> Page Refresh: {{ refresh }} seconds<br/>
{% endif %} {% endif %}
Version: {{ version }}
</p>
<p>
<a href="/active">Swaps in progress: {{ summary.num_swapping }}</a><br/> <a href="/active">Swaps in progress: {{ summary.num_swapping }}</a><br/>
<a href="/offers">Network Offers: {{ summary.num_network_offers }}</a><br/> <a href="/offers">Network Offers: {{ summary.num_network_offers }}</a><br/>
<a href="/sentoffers">Sent Offers: {{ summary.num_sent_offers }}</a><br/> <a href="/sentoffers">Sent Offers: {{ summary.num_sent_offers }}</a><br/>

View File

@ -22,14 +22,6 @@
"bindir": "/opt/bin/litecoin", "bindir": "/opt/bin/litecoin",
"use_segwit": true, "use_segwit": true,
"blocks_confirmed": 2 "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, "check_progress_seconds": 60,