packages feed

network-bitcoin 1.1.0 → 1.2.0

raw patch · 2 files changed

+11/−12 lines, 2 files

Files

network-bitcoin.cabal view
@@ -1,5 +1,5 @@ Name:                network-bitcoin-Version:             1.1.0+Version:             1.2.0 Synopsis:            An interface to bitcoind. Description:     This can be used to send Bitcoins, query balances, etc.  It@@ -31,7 +31,7 @@ Category:            Network Build-type:          Simple Cabal-version:       >=1.8-tested-with:         GHC ==7.4.1, GHC ==7.6.2+tested-with:         GHC ==7.4.1, GHC ==7.6.2, GHC ==7.6.3  Library   hs-source-dirs: src
src/Network/Bitcoin/Net.hs view
@@ -21,17 +21,16 @@ getConnectionCount :: Auth -> IO Integer getConnectionCount auth = callApi auth "getconnectioncount" [] --- | Information on a given connected node in the network.+-- | Information about a peer node of the Bitcoin network. -- --   The documentation for this data structure is incomplete, as I honestly --   don't know what some of these fields are for. Patches are welcome! data PeerInfo =-    PeerInfo { -- | The ip:port of this peer, as a string.+    PeerInfo { -- | The IP:port of this peer, as a string.                addressName :: Text              , services :: Text-             -- | Relative to when we first time we conected with this peer-             --   (and in milliseconds), the last time we sent this peer any-             --   data.+             -- | Relative to the first time we conected with this peer (and in+             -- milliseconds), the last time we sent this peer any data.              , lastSend :: Integer              -- | Relative to the first time we connected with this peer              --   (and in milliseconds), the last time we sent this peer any@@ -40,10 +39,10 @@               -- | How long have we been connected to this peer (in               --   milliseconds).              , connectionTime :: Integer-             -- | The version of bitcoind the peer is running.+             -- | The version of the Bitcion client the peer is running.              , peerVersion :: Integer-             -- | The sub-version of bitcoind the peer is running.-             , peerSubversion :: Integer+             -- | The sub-version of the Bitcoin client the peer is running.+             , peerSubversion :: Text              , inbound :: Bool              , releaseTime :: Integer              , startingHeight :: Integer@@ -66,6 +65,6 @@                                     <*> o .: "banscore"     parseJSON _ = mzero --- | Returns data about each connected network node.-getPeerInfo :: Auth -> IO PeerInfo+-- | Returns data about all connected peer nodes.+getPeerInfo :: Auth -> IO [PeerInfo] getPeerInfo auth = callApi auth "getpeerinfo" []