Skip to content

Commit

Permalink
Pre-commit to version 0.87
Browse files Browse the repository at this point in the history
  • Loading branch information
etotheipi committed Jan 12, 2013
1 parent 4fd8652 commit 886d3fd
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 22 deletions.
39 changes: 20 additions & 19 deletions armoryd.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
# https://bitcointalk.org/index.php?topic=92496.0
#####

from twisted.web import server
from twisted.internet import reactor
from txjsonrpc.web import jsonrpc
from armoryengine import *
Expand All @@ -70,9 +69,9 @@
################################################################################
# Copied from http://twistedmatrix.com/documents/current/web/examples/webguard.py
from zope.interface import implements
from twisted.web import server, resource
from twisted.web.guard import HTTPAuthSessionWrapper, DigestCredentialFactory
from twisted.web.guard import resource
from twisted.cred.portal import Portal
from twisted.cred.portal import Portal, IRealm
from twisted.cred.checkers import FilePasswordDB

#####
Expand All @@ -88,21 +87,21 @@ def render(self, request):


#####
class SimpleRealm(IRealm):
class SimpleRealm(object):
"""
A realm which gives out L{GuardedResource} instances for authenticated users.
"""
def __init__(self, *args)):
super(SimpleRealm, self).__

implements(IRealm)

def requestAvatar(self, avatarId, mind, *interfaces):
if resource.IResource in interfaces:
return resource.IResource, GuardedResource(), lambda: None
raise NotImplementedError()


#####
portal = Portal(SimpleRealm(), [FilePasswordDB('passwd.txt','=',0,1)])
portal = Portal(SimpleRealm(), [FilePasswordDB('passwd.txt','=')])
credFactory = DigestCredentialFactory('sha256', 'localhost:7070')
wrapper = HTTPAuthSessionWrapper( portal, [credFactory] )

Expand Down Expand Up @@ -204,7 +203,7 @@ def jsonrpc_listtransactions(self, tx_count=10, from_tx=0):
def create_unsigned_transaction(self, bitcoinaddress_str, amount_to_send_btc):
# Get unspent TxOutList and select the coins
addr160_recipient = addrStr_to_hash160(bitcoinaddress_str)
totalSend, fee = long(amount_to_send_btc * ONE_BTC), (STANDARD_FEE * ONE_BTC)
totalSend, fee = long(amount_to_send_btc * ONE_BTC), 0
spendBal = self.wallet.getBalance('Spendable')
utxoList = self.wallet.getTxOutList('Spendable')
utxoSelect = PySelectCoins(utxoList, totalSend, fee)
Expand Down Expand Up @@ -259,7 +258,8 @@ def __init__(self):
self.start()

def start(self):
sys.stdout.write("\nServer started")
print 'Wallet balance: ', coin2str(self.wallet.getBalance('Spendable'), maxZeros=0)
print 'Server started...'
reactor.run()

def handleIncomingTxFunc(self, pytxObj):
Expand All @@ -282,16 +282,17 @@ def showOnlineMsg(self):
sys.stdout.write("\n%s Online - tracking blockchain" % datetime.now().isoformat())

def find_wallet(self):
fnames = os.listdir(os.getcwd())
for fname in fnames:
is_wallet = fname[-7:] == ".wallet"
is_watchonly = fname.find("watchonly") > -1
is_backup = fname.find("backup") > -1
if(is_wallet and is_watchonly and not is_backup):
wallet = PyBtcWallet().readWalletFile(fname)
sys.stdout.write("\nUsing wallet file %s" % fname)
return wallet
raise ValueError('Unable to locate a watch-only wallet in %s' % os.getcwd())
return PyBtcWallet().readWalletFile('armory.testnet.watchonly.wallet')
#fnames = os.listdir(os.getcwd())
#for fname in fnames:
#is_wallet = fname[-7:] == ".wallet"
#is_watchonly = fname.find("watchonly") > -1
#is_backup = fname.find("backup") > -1
#if(is_wallet and is_watchonly and not is_backup):
#wallet = PyBtcWallet().readWalletFile(fname)
#sys.stdout.write("\nUsing wallet file %s" % fname)
#return wallet
#raise ValueError('Unable to locate a watch-only wallet in %s' % os.getcwd())

def loadBlockchain(self):
TheBDM.setBlocking(True)
Expand Down
2 changes: 1 addition & 1 deletion armoryengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


# Version Numbers
BTCARMORY_VERSION = (0, 86, 9, 0) # (Major, Minor, Bugfix, AutoIncrement)
BTCARMORY_VERSION = (0, 87, 0, 0) # (Major, Minor, Bugfix, AutoIncrement)
PYBTCWALLET_VERSION = (1, 35, 0, 0) # (Major, Minor, Bugfix, AutoIncrement)

ARMORY_DONATION_ADDR = '1ArmoryXcfq7TnCSuZa9fQjRYwJ4bkRKfv'
Expand Down
1 change: 1 addition & 0 deletions qtdialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6687,6 +6687,7 @@ def saveTx(self):
f.close()
if not newSaveFile==self.fileLoaded:
os.remove(self.fileLoaded)
self.fileLoaded = newSaveFile
QMessageBox.information(self, 'Transaction Saved!',\
'Your transaction has been saved to the following location:'
'\n\n%s\n\nIt can now be broadcast from any computer with '
Expand Down
37 changes: 35 additions & 2 deletions versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,48 @@
# anyway...

#-------------------------------------------------------------------------------
VERSION 0.86.4
VERSION 0.87
- Inflatable QR Codes Everywhere!
QR codes added to multiple areas where addresses are displayed,
including the "Create Clickable Link" window which displays the
full payment request in the QR code. Double-click on any QR
code to inflate it to full screen.

- Added Paper Backup info to "Backup Individual Keys"
If you have a lot of imported keys, you can now backup
everything using the "Backup Individual Keys" dialog. It
displays the same four lines as on your paper backup, at the
top of the key list. Also added option to include the address
pool to the backup.

- New Right-Click Menu Options
The "Transactions" ledger and address lists have new options,
including links to view the data on blockchain.info.

- Real support for Bitcoin-Qt/bitcoind 0.8+
Prior attempt at supporting 0.8 Satoshi client was broken due to
incomplete information about the changes. Support has finally
been implemented and tested.

- Bugfix: Copying Payment Requests
The "Copy to Clipboard" button on the payment request dialog
never worked reliably. It now copies actually-clickable links
that should paste correctly into other applications, such as
email apps (Outlook, Thunderbird), and message composition forms
in webbrowser email sessions.

- Bugfix: P2Pool Transactions
Importing wallets with P2Pool transactions no long crash Armory
Importing wallets with P2Pool transactions no longer crashes Armory

- Bugfix: Sweeping and Importing Addresses
Some problems with sweeping have been resolved. Importing addresses
already contained in other wallets is prohibited now. It used to
just produce weird answers, now it appears to produce crashes.

- Billions of Little Bug Fixes
Special thanks to forum user "subSTRATA" who identified about
many DOZEN minor bugs and suboptimal features. Most of them
have been fixed/upgraded, to create a smoother experience, overall.

#-------------------------------------------------------------------------------
VERSION 0.86.3
Expand Down

0 comments on commit 886d3fd

Please sign in to comment.