network-bitcoin 1.4.0 → 1.5.0
raw patch · 5 files changed
+10/−8 lines, 5 files
Files
- network-bitcoin.cabal +1/−1
- src/Network/Bitcoin/Dump.hs +3/−2
- src/Network/Bitcoin/Net.hs +4/−2
- src/Network/Bitcoin/Wallet.hs +1/−1
- src/Test/Main.hs +1/−2
network-bitcoin.cabal view
@@ -1,5 +1,5 @@ Name: network-bitcoin-Version: 1.4.0+Version: 1.5.0 Synopsis: An interface to bitcoind. Description: This can be used to send Bitcoins, query balances, etc. It
src/Network/Bitcoin/Dump.hs view
@@ -10,6 +10,7 @@ , dumpPrivateKey ) where +import Control.Applicative import Network.Bitcoin.Internal -- | A textual representation of a bitcoin private key.@@ -22,9 +23,9 @@ -- ^ An optional label for the key. -> IO () importPrivateKey auth pk Nothing =- callApi auth "importprivkey" [ tj pk ]+ unNil <$> callApi auth "importprivkey" [ tj pk ] importPrivateKey auth pk (Just label) =- callApi auth "importprivkey" [ tj pk, tj label ]+ unNil <$> callApi auth "importprivkey" [ tj pk, tj label ] -- | Reveals the private key corresponding to the given address. dumpPrivateKey :: Auth
src/Network/Bitcoin/Net.hs view
@@ -36,6 +36,8 @@ -- (and in milliseconds), the last time we sent this peer any -- data. , lastRecv :: Integer+ , bytesSent :: Integer+ , bytesRecv :: Integer -- | How long have we been connected to this peer (in -- milliseconds). , connectionTime :: Integer@@ -44,7 +46,6 @@ -- | The sub-version of the Bitcoin client the peer is running. , peerSubversion :: Text , inbound :: Bool- , releaseTime :: Integer , startingHeight :: Integer -- | How many times has this peer behaved badly? , banScore :: Integer@@ -56,11 +57,12 @@ <*> o .: "services" <*> o .: "lastsend" <*> o .: "lastrecv"+ <*> o .: "bytessent"+ <*> o .: "bytesrecv" <*> o .: "conntime" <*> o .: "version" <*> o .: "subver" <*> o .: "inbound"- <*> o .: "releasetime" <*> o .: "startingheight" <*> o .: "banscore" parseJSON _ = mzero
src/Network/Bitcoin/Wallet.hs view
@@ -138,7 +138,7 @@ -- | Sets the account associated with the given address. setAccount :: Auth -> Address -> Account -> IO ()-setAccount auth addr acc = callApi auth "setaccount" [ tj addr, tj acc ]+setAccount auth addr acc = unNil <$> callApi auth "setaccount" [ tj addr, tj acc ] -- | Returns the account associated with the given address. getAccount :: Auth -> Address -> IO Account
src/Test/Main.hs view
@@ -6,8 +6,7 @@ import Test.QuickCheck import Test.QuickCheck.Monadic import Network.Bitcoin-import Data.Aeson-import Data.Vector ( empty, mapM )+import Data.Vector ( empty ) main :: IO ()