bitcoin-s/api/org/bitcoins/node/Node.html

29 lines
109 KiB
HTML
Raw Normal View History

<!DOCTYPE html ><html><head><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/><title></title><meta content="" name="description"/><meta content="" name="keywords"/><meta http-equiv="content-type" content="text/html; charset=UTF-8"/><link href="../../../lib/index.css" media="screen" type="text/css" rel="stylesheet"/><link href="../../../lib/template.css" media="screen" type="text/css" rel="stylesheet"/><link href="../../../lib/print.css" media="print" type="text/css" rel="stylesheet"/><link href="../../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css"/><script type="text/javascript" src="../../../lib/jquery.min.js"></script><script type="text/javascript" src="../../../lib/index.js"></script><script type="text/javascript" src="../../../index.js"></script><script type="text/javascript" src="../../../lib/scheduler.js"></script><script type="text/javascript" src="../../../lib/template.js"></script><script type="text/javascript">/* this variable can be used by the JS to determine the path to the root document */
var toRoot = '../../../';</script></head><body><div id="search"><span id="doc-title"><span id="doc-version"></span></span> <span class="close-results"><span class="left">&lt;</span> Back</span><div id="textfilter"><span class="input"><input autocapitalize="none" placeholder="Search" id="index-input" type="text" accesskey="/"/><i class="clear material-icons"></i><i id="search-icon" class="material-icons"></i></span></div></div><div id="search-results"><div id="search-progress"><div id="progress-fill"></div></div><div id="results-content"><div id="entity-results"></div><div id="member-results"></div></div></div><div id="content-scroll-container" style="-webkit-overflow-scrolling: touch;"><div id="content-container" style="-webkit-overflow-scrolling: touch;"><div id="subpackage-spacer"><div id="packages"><h1>Packages</h1><ul><li class="indented0 " name="_root_.root" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="_root_" class="anchorToMember"></a><a id="root:_root_" class="anchorToMember"></a> <span class="permalink"><a href="../../../index.html" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">package</span></span> <span class="symbol"><a href="../../../index.html" title=""><span class="name">root</span></a></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="../../../index.html" name="_root_" id="_root_" class="extype">root</a></dd></dl></div></li><li class="indented1 " name="_root_.org" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="org" class="anchorToMember"></a><a id="org:org" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/index.html" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">package</span></span> <span class="symbol"><a href="../../index.html" title=""><span class="name">org</span></a></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="../../../index.html" name="_root_" id="_root_" class="extype">root</a></dd></dl></div></li><li class="indented2 " name="org.bitcoins" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="bitcoins" class="anchorToMember"></a><a id="bitcoins:bitcoins" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/index.html" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">package</span></span> <span class="symbol"><a href="../index.html" title=""><span class="name">bitcoins</span></a></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="../../index.html" name="org" id="org" class="extype">org</a></dd></dl></div></li><li class="indented3 " name="org.bitcoins.node" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="node" class="anchorToMember"></a><a id="node:node" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/index.html" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">package</span></span> <span class="symbol"><a href="index.html" title=""><span class="name">node</span></a></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="../index.html" name="org.bitcoins" id="org.bitcoins" class="extype">bitcoins</a></dd></dl></div></li><li class="indented4 " name="org.bitcoins.node.config" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="config" class="anchorToMember"></a><a id="config:config" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/config/index.html" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span cla
</p></div><div class="toggleContainer"><div class="toggle block"><span>Linear Supertypes</span><div class="superTypes hiddenContent"><span name="org.bitcoins.node.P2PLogger" class="extype">P2PLogger</span>, <a href="https://javadoc.io/page/org.clapper/grizzled-slf4j_2.13/1.3.4/grizzled/slf4j/Logging.html#grizzled.slf4j.Logging" name="grizzled.slf4j.Logging" id="grizzled.slf4j.Logging" class="extype">Logging</a>, <a href="../core/api/chain/ChainQueryApi.html" name="org.bitcoins.core.api.chain.ChainQueryApi" id="org.bitcoins.core.api.chain.ChainQueryApi" class="extype">ChainQueryApi</a>, <a href="../core/api/node/NodeApi.html" name="org.bitcoins.core.api.node.NodeApi" id="org.bitcoins.core.api.node.NodeApi" class="extype">NodeApi</a>, <a href="../../../scala/index.html#AnyRef=Object" name="scala.AnyRef" id="scala.AnyRef" class="extmbr">AnyRef</a>, <a href="https://www.scala-lang.org/api/2.13.6/scala/Any.html#scala.Any" name="scala.Any" id="scala.Any" class="extype">Any</a></div></div></div><div class="toggleContainer"><div class="toggle block"><span>Known Subclasses</span><div class="subClasses hiddenContent"><a href="NeutrinoNode.html" name="org.bitcoins.node.NeutrinoNode" id="org.bitcoins.node.NeutrinoNode" class="extype">NeutrinoNode</a>, <a href="SpvNode.html" name="org.bitcoins.node.SpvNode" id="org.bitcoins.node.SpvNode" class="extype">SpvNode</a></div></div></div></div><div id="mbrsel"><div class="toggle"></div><div id="memberfilter"><i class="material-icons arrow"></i><span class="input"><input placeholder="Filter all members" id="mbrsel-input" type="text" accesskey="/"/></span><i class="clear material-icons"></i></div><div id="filterby"><div id="order"><span class="filtertype">Ordering</span><ol><li class="alpha in"><span>Alphabetic</span></li><li class="inherit out"><span>By Inheritance</span></li></ol></div><div class="ancestors"><span class="filtertype">Inherited<br/></span><ol id="linearization"><li class="in" name="org.bitcoins.node.Node"><span>Node</span></li><li class="in" name="org.bitcoins.node.P2PLogger"><span>P2PLogger</span></li><li class="in" name="grizzled.slf4j.Logging"><span>Logging</span></li><li class="in" name="org.bitcoins.core.api.chain.ChainQueryApi"><span>ChainQueryApi</span></li><li class="in" name="org.bitcoins.core.api.node.NodeApi"><span>NodeApi</span></li><li class="in" name="scala.AnyRef"><span>AnyRef</span></li><li class="in" name="scala.Any"><span>Any</span></li></ol></div><div class="ancestors"><span class="filtertype"></span><ol><li class="hideall out"><span>Hide All</span></li><li class="showall in"><span>Show All</span></li></ol></div><div id="visbl"><span class="filtertype">Visibility</span><ol><li class="public in"><span>Public</span></li><li class="protected out"><span>Protected</span></li></ol></div></div></div><div id="template"><div id="allMembers"><div class="values members"><h3>Abstract Value Members</h3><ol><li class="indented0 " name="org.bitcoins.node.Node#chainAppConfig" group="Ungrouped" fullComment="no" data-isabs="true" visbl="pub"><a id="chainAppConfig:org.bitcoins.chain.config.ChainAppConfig" class="anchorToMember"></a><a id="chainAppConfig:ChainAppConfig" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#chainAppConfig:org.bitcoins.chain.config.ChainAppConfig" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier">implicit abstract </span> <span class="kind">def</span></span> <span class="symbol"><span class="name">chainAppConfig</span><span class="result">: <a href="../chain/config/ChainAppConfig.html" name="org.bitcoins.chain.config.ChainAppConfig" id="org.bitcoins.chain.config.ChainAppConfig" class="extype">ChainAppConfig</a></span></span></li><li class="indented0 " name="org.bitcoins.node.Node#getDataMessageHandler" group="Ungrouped" fullComment="yes" data-isabs="true" visbl="pub"><a id="getDataMessageHandler:org.bitcoins.node.networking.peer.DataMessageHandler" class="anchorToMember"></a><a id="getDataMessageHandler:DataMessageHandler" class="an
It should be noted that the dataMessageHandler contains
chainstate. When we update with a new chainstate, we need to
maek sure we update the <span name="DataMessageHandler" class="extype">DataMessageHandler</span> via <span name="updateDataMessageHandler()" class="extype">updateDataMessageHandler()</span>
to make sure we don't corrupt our chainstate cache
</p></div></div></li><li class="indented0 " name="org.bitcoins.core.api.chain.ChainQueryApi#getFilterCount" group="Ungrouped" fullComment="yes" data-isabs="true" visbl="pub"><a id="getFilterCount():scala.concurrent.Future[Int]" class="anchorToMember"></a><a id="getFilterCount():Future[Int]" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#getFilterCount():scala.concurrent.Future[Int]" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier">abstract </span> <span class="kind">def</span></span> <span class="symbol"><span class="name">getFilterCount</span><span class="params">()</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/concurrent/Future.html#scala.concurrent.Future" name="scala.concurrent.Future" id="scala.concurrent.Future" class="extype">Future</a>[<a href="https://www.scala-lang.org/api/2.13.6/scala/Int.html#scala.Int" name="scala.Int" id="scala.Int" class="extype">Int</a>]</span></span><p class="shortcomment cmt">Gets the number of compact filters in the database</p><div class="fullcomment"><div class="comment cmt"><p>Gets the number of compact filters in the database</p></div><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="../core/api/chain/ChainQueryApi.html" name="org.bitcoins.core.api.chain.ChainQueryApi" id="org.bitcoins.core.api.chain.ChainQueryApi" class="extype">ChainQueryApi</a></dd></dl></div></li><li class="indented0 " name="org.bitcoins.core.api.chain.ChainQueryApi#getFiltersBetweenHeights" group="Ungrouped" fullComment="yes" data-isabs="true" visbl="pub"><a id="getFiltersBetweenHeights(startHeight:Int,endHeight:Int):scala.concurrent.Future[Vector[org.bitcoins.core.api.chain.ChainQueryApi.FilterResponse]]" class="anchorToMember"></a><a id="getFiltersBetweenHeights(Int,Int):Future[Vector[FilterResponse]]" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#getFiltersBetweenHeights(startHeight:Int,endHeight:Int):scala.concurrent.Future[Vector[org.bitcoins.core.api.chain.ChainQueryApi.FilterResponse]]" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier">abstract </span> <span class="kind">def</span></span> <span class="symbol"><span class="name">getFiltersBetweenHeights</span><span class="params">(<span name="startHeight">startHeight: <a href="https://www.scala-lang.org/api/2.13.6/scala/Int.html#scala.Int" name="scala.Int" id="scala.Int" class="extype">Int</a></span>, <span name="endHeight">endHeight: <a href="https://www.scala-lang.org/api/2.13.6/scala/Int.html#scala.Int" name="scala.Int" id="scala.Int" class="extype">Int</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/concurrent/Future.html#scala.concurrent.Future" name="scala.concurrent.Future" id="scala.concurrent.Future" class="extype">Future</a>[<a href="../../../scala/index.html#Vector[+A]=scala.collection.immutable.Vector[A]" name="scala.Vector" id="scala.Vector" class="extmbr">Vector</a>[<a href="../core/api/chain/ChainQueryApi$$FilterResponse.html" name="org.bitcoins.core.api.chain.ChainQueryApi.FilterResponse" id="org.bitcoins.core.api.chain.ChainQueryApi.FilterResponse" class="extype">FilterResponse</a>]]</span></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="../core/api/chain/ChainQueryApi.html" name="org.bitcoins.core.api.chain.ChainQueryApi" id="org.bitcoins.core.api.chain.ChainQueryApi" class="extype">ChainQueryApi</a></dd></dl></div></li><li class="indented0 " name="org.bitcoins.core.api.chain.ChainQueryApi#getHeightByBlockStamp" group="Ungrouped" fullComment="yes" data-isabs="true" visbl="pub"><a id="getHeightByBlockStamp(blockStamp:org.bitcoins.core.protocol.BlockStamp):scala.concurrent.Future[Int]" class="anchorToMember"></a><a id="getHeightByBlockStamp(BlockStamp):Future[Int]" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.htm
</p><div class="fullcomment"><div class="comment cmt"><p>Broadcasts the given transaction over the P2P network
</p></div><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="../core/api/node/NodeApi.html" name="org.bitcoins.core.api.node.NodeApi" id="org.bitcoins.core.api.node.NodeApi" class="extype">NodeApi</a></dd></dl></div></li><li class="indented0 " name="org.bitcoins.node.Node#broadcastTransactions" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="broadcastTransactions(transactions:Vector[org.bitcoins.core.protocol.transaction.Transaction]):scala.concurrent.Future[Unit]" class="anchorToMember"></a><a id="broadcastTransactions(Vector[Transaction]):Future[Unit]" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#broadcastTransactions(transactions:Vector[org.bitcoins.core.protocol.transaction.Transaction]):scala.concurrent.Future[Unit]" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">broadcastTransactions</span><span class="params">(<span name="transactions">transactions: <a href="../../../scala/index.html#Vector[+A]=scala.collection.immutable.Vector[A]" name="scala.Vector" id="scala.Vector" class="extmbr">Vector</a>[<a href="../core/protocol/transaction/Transaction.html" name="org.bitcoins.core.protocol.transaction.Transaction" id="org.bitcoins.core.protocol.transaction.Transaction" class="extype">Transaction</a>]</span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/concurrent/Future.html#scala.concurrent.Future" name="scala.concurrent.Future" id="scala.concurrent.Future" class="extype">Future</a>[<a href="https://www.scala-lang.org/api/2.13.6/scala/Unit.html#scala.Unit" name="scala.Unit" id="scala.Unit" class="extype">Unit</a>]</span></span><p class="shortcomment cmt">Broadcasts the given transaction over the P2P network</p><div class="fullcomment"><div class="comment cmt"><p>Broadcasts the given transaction over the P2P network</p></div><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="" name="org.bitcoins.node.Node" id="org.bitcoins.node.Node" class="extype">Node</a><a href="../core/api/node/NodeApi.html" name="org.bitcoins.core.api.node.NodeApi" id="org.bitcoins.core.api.node.NodeApi" class="extype">NodeApi</a></dd></dl></div></li><li class="indented0 " name="org.bitcoins.node.Node#chainApiFromDb" group="Ungrouped" fullComment="no" data-isabs="false" visbl="pub"><a id="chainApiFromDb()(implicitexecutionContext:scala.concurrent.ExecutionContext):scala.concurrent.Future[org.bitcoins.chain.blockchain.ChainHandlerCached]" class="anchorToMember"></a><a id="chainApiFromDb()(ExecutionContext):Future[ChainHandlerCached]" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#chainApiFromDb()(implicitexecutionContext:scala.concurrent.ExecutionContext):scala.concurrent.Future[org.bitcoins.chain.blockchain.ChainHandlerCached]" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">chainApiFromDb</span><span class="params">()</span><span class="params">(<span class="implicit">implicit </span><span name="executionContext">executionContext: <a href="https://www.scala-lang.org/api/2.13.6/scala/concurrent/ExecutionContext.html#scala.concurrent.ExecutionContext" name="scala.concurrent.ExecutionContext" id="scala.concurrent.ExecutionContext" class="extype">ExecutionContext</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/concurrent/Future.html#scala.concurrent.Future" name="scala.concurrent.Future" id="scala.concurrent.Future" class="extype">Future</a>[<a href="../chain/blockchain/ChainHandlerCached.html" name="org.bitcoins.chain.blockchain.ChainHandlerCached" id="org.bitcoins.chain.blockchain.ChainHandlerCached" class="extype">ChainHandlerCached</a>]</span></span><p class="shortcomment cmt">This is constructing a ch
This involves database calls which can be slow and expensive to construct
our <a href="../chain/blockchain/Blockchain.html" name="org.bitcoins.chain.blockchain.Blockchain" id="org.bitcoins.chain.blockchain.Blockchain" class="extype">Blockchain</a>
</p></li><li class="indented0 " name="org.bitcoins.node.Node#clients" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="clients:Vector[org.bitcoins.node.networking.P2PClient]" class="anchorToMember"></a><a id="clients:Vector[P2PClient]" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#clients:Vector[org.bitcoins.node.networking.P2PClient]" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">lazy val</span></span> <span class="symbol"><span class="name">clients</span><span class="result">: <a href="../../../scala/index.html#Vector[+A]=scala.collection.immutable.Vector[A]" name="scala.Vector" id="scala.Vector" class="extmbr">Vector</a>[<a href="networking/P2PClient.html" name="org.bitcoins.node.networking.P2PClient" id="org.bitcoins.node.networking.P2PClient" class="extype">P2PClient</a>]</span></span><p class="shortcomment cmt">Unlike our chain api, this is cached inside our node
object.</p><div class="fullcomment"><div class="comment cmt"><p>Unlike our chain api, this is cached inside our node
object. Internally in <a href="networking/P2PClient.html" name="org.bitcoins.node.networking.P2PClient" id="org.bitcoins.node.networking.P2PClient" class="extype">p2p client</a> you will see that
the <span name="ChainApi" class="extype">chain api</span> is updated inside of the p2p client
</p></div></div></li><li class="indented0 " name="scala.AnyRef#clone" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="prt"><a id="clone():Object" class="anchorToMember"></a><a id="clone():AnyRef" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#clone():Object" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">clone</span><span class="params">()</span><span class="result">: <a href="../../../scala/index.html#AnyRef=Object" name="scala.AnyRef" id="scala.AnyRef" class="extmbr">AnyRef</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Attributes</dt><dd>protected[<span name="java.lang" class="extype">lang</span>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd><span class="name">@throws</span><span class="args">(<span><span class="defval">classOf[java.lang.CloneNotSupportedException]</span></span>)</span> <span class="name">@native</span><span class="args">()</span> </dd></dl></div></li><li class="indented0 " name="grizzled.slf4j.Logging#debug" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="prt"><a id="debug(mkr:org.slf4j.Marker,msg:=&gt;Any,t:=&gt;Throwable):Unit" class="anchorToMember"></a><a id="debug(Marker,=&gt;Any,=&gt;Throwable):Unit" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#debug(mkr:org.slf4j.Marker,msg:=&gt;Any,t:=&gt;Throwable):Unit" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">debug</span><span class="params">(<span name="mkr">mkr: <a href="https://javadoc.io/page/org.slf4j/slf4j-api/1.7.30/org/slf4j/Marker.html#org.slf4j.Marker" name="org.slf4j.Marker" id="org.slf4j.Marker" class="extype">Marker</a></span>, <span name="msg">msg: =&gt; <a href="https://www.scala-lang.org/api/2.13.6/scala/Any.html#scala.Any" name="scala.Any" id="scala.Any" class="extype">Any</a></span>, <span name="t">t: =&gt; <a href="../../../scala/index.html#Throwable=Throwable" name="scala.Throwable" id="scala.Throwable" class="extmbr">Throwable</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Unit.html#scala.Unit" name="scala.Unit" id="scala.Unit" class="extype">Unit</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Attributes</dt><dd>protected </dd><dt>Definition Classes</dt><dd>Logging</dd></dl></div></li><li class="indented0 " name="grizzled.slf4j.Logging#debug" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="prt"><a id="debug(msg:=&gt;Any,t:=&gt;Throwable):Unit" class="anchorToMember"></a><a id="debug(=&gt;Any,=&gt;Throwable):Unit" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#debug(msg:=&gt;Any,t:=&gt;Throwable):Unit" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">debug</span><span class="params">(<span name="msg">msg: =&gt; <a href="https://www.scala-lang.org/api/2.13.6/scala/Any.html#scala.Any" name="scala.Any" id="scala.Any" class="extype">Any</a></span>, <span name="t">t: =&gt; <a href="../../../scala/index.html#Throwable=Throwable" name="scala.Throwable" id="scala.Throwable" class="extmbr">Throwable</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Unit.html#scala.Unit" name="scala.Unit" id="scala.Unit" class="extype">Unit</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Attributes</dt><dd>protected </dd><dt>Definition Classes</dt><dd>Logging</dd></dl></div></li><li class="indented0 " name="grizzled.slf4j.Logging#debug" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="prt"><a id="debug(msg:=&
</p></div><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="" name="org.bitcoins.node.Node" id="org.bitcoins.node.Node" class="extype">Node</a><a href="../core/api/node/NodeApi.html" name="org.bitcoins.core.api.node.NodeApi" id="org.bitcoins.core.api.node.NodeApi" class="extype">NodeApi</a></dd></dl></div></li><li class="indented0 " name="org.bitcoins.node.Node#epochSecondToBlockHeight" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="epochSecondToBlockHeight(time:Long):scala.concurrent.Future[Int]" class="anchorToMember"></a><a id="epochSecondToBlockHeight(Long):Future[Int]" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#epochSecondToBlockHeight(time:Long):scala.concurrent.Future[Int]" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">epochSecondToBlockHeight</span><span class="params">(<span name="time">time: <a href="https://www.scala-lang.org/api/2.13.6/scala/Long.html#scala.Long" name="scala.Long" id="scala.Long" class="extype">Long</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/concurrent/Future.html#scala.concurrent.Future" name="scala.concurrent.Future" id="scala.concurrent.Future" class="extype">Future</a>[<a href="https://www.scala-lang.org/api/2.13.6/scala/Int.html#scala.Int" name="scala.Int" id="scala.Int" class="extype">Int</a>]</span></span><p class="shortcomment cmt">Gets the block height of the closest block to the given time</p><div class="fullcomment"><div class="comment cmt"><p>Gets the block height of the closest block to the given time</p></div><dl class="attributes block"><dt>Definition Classes</dt><dd><a href="" name="org.bitcoins.node.Node" id="org.bitcoins.node.Node" class="extype">Node</a><a href="../core/api/chain/ChainQueryApi.html" name="org.bitcoins.core.api.chain.ChainQueryApi" id="org.bitcoins.core.api.chain.ChainQueryApi" class="extype">ChainQueryApi</a></dd></dl></div></li><li class="indented0 " name="scala.AnyRef#eq" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="eq(x$1:AnyRef):Boolean" class="anchorToMember"></a><a id="eq(AnyRef):Boolean" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#eq(x$1:AnyRef):Boolean" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier">final </span> <span class="kind">def</span></span> <span class="symbol"><span class="name">eq</span><span class="params">(<span name="arg0">arg0: <a href="../../../scala/index.html#AnyRef=Object" name="scala.AnyRef" id="scala.AnyRef" class="extmbr">AnyRef</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Boolean.html#scala.Boolean" name="scala.Boolean" id="scala.Boolean" class="extype">Boolean</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div></li><li class="indented0 " name="scala.AnyRef#equals" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="equals(x$1:Object):Boolean" class="anchorToMember"></a><a id="equals(AnyRef):Boolean" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#equals(x$1:Object):Boolean" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">equals</span><span class="params">(<span name="arg0">arg0: <a href="../../../scala/index.html#AnyRef=Object" name="scala.AnyRef" id="scala.AnyRef" class="extmbr">AnyRef</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Boolean.html#scala.Boolean" name="scala.Boolean" id="scala.Boolean" class="extype">Boolean</a></span></span><div class="fullcomment"><dl class="attributes
This means we can now send arbitrary messages to our peer
</p></li><li class="indented0 " name="scala.Any#isInstanceOf" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="isInstanceOf[T0]:Boolean" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#isInstanceOf[T0]:Boolean" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier">final </span> <span class="kind">def</span></span> <span class="symbol"><span class="name">isInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Boolean.html#scala.Boolean" name="scala.Boolean" id="scala.Boolean" class="extype">Boolean</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd>Any</dd></dl></div></li><li class="indented0 " name="grizzled.slf4j.Logging#isTraceEnabled" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="prt"><a id="isTraceEnabled:Boolean" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#isTraceEnabled:Boolean" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">isTraceEnabled</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Boolean.html#scala.Boolean" name="scala.Boolean" id="scala.Boolean" class="extype">Boolean</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Attributes</dt><dd>protected </dd><dt>Definition Classes</dt><dd>Logging</dd></dl></div></li><li class="indented0 " name="grizzled.slf4j.Logging#isWarnEnabled" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="prt"><a id="isWarnEnabled:Boolean" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#isWarnEnabled:Boolean" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">isWarnEnabled</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Boolean.html#scala.Boolean" name="scala.Boolean" id="scala.Boolean" class="extype">Boolean</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Attributes</dt><dd>protected </dd><dt>Definition Classes</dt><dd>Logging</dd></dl></div></li><li class="indented0 " name="grizzled.slf4j.Logging#logger" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="prt"><a id="logger:grizzled.slf4j.Logger" class="anchorToMember"></a><a id="logger:Logger" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#logger:grizzled.slf4j.Logger" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">logger</span><span class="result">: <a href="https://javadoc.io/page/org.clapper/grizzled-slf4j_2.13/1.3.4/grizzled/slf4j/Logger.html#grizzled.slf4j.Logger" name="grizzled.slf4j.Logger" id="grizzled.slf4j.Logger" class="extype">Logger</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Attributes</dt><dd>protected </dd><dt>Definition Classes</dt><dd>Logging</dd></dl></div></li><li class="indented0 " name="grizzled.slf4j.Logging#loggerName" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="prt"><a id="loggerName:String" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#loggerName:String" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">loggerName</span><span class="result">: <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java/lang/String.html#java.lang.String
This method is useful for playing around
with P2P messages, therefore marked as
<code>private[node]</code>.
</p></div></div></li><li class="indented0 " name="org.bitcoins.node.Node#setPeerServices" group="Ungrouped" fullComment="no" data-isabs="false" visbl="pub"><a id="setPeerServices(peer:org.bitcoins.node.models.Peer,serviceIdentifier:org.bitcoins.core.p2p.ServiceIdentifier):Unit" class="anchorToMember"></a><a id="setPeerServices(Peer,ServiceIdentifier):Unit" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#setPeerServices(peer:org.bitcoins.node.models.Peer,serviceIdentifier:org.bitcoins.core.p2p.ServiceIdentifier):Unit" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">setPeerServices</span><span class="params">(<span name="peer">peer: <a href="models/Peer.html" name="org.bitcoins.node.models.Peer" id="org.bitcoins.node.models.Peer" class="extype">Peer</a></span>, <span name="serviceIdentifier">serviceIdentifier: <a href="../core/p2p/ServiceIdentifier.html" name="org.bitcoins.core.p2p.ServiceIdentifier" id="org.bitcoins.core.p2p.ServiceIdentifier" class="extype">ServiceIdentifier</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Unit.html#scala.Unit" name="scala.Unit" id="scala.Unit" class="extype">Unit</a></span></span></li><li class="indented0 " name="org.bitcoins.node.Node#start" group="Ungrouped" fullComment="no" data-isabs="false" visbl="pub"><a id="start():scala.concurrent.Future[org.bitcoins.node.Node]" class="anchorToMember"></a><a id="start():Future[Node]" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#start():scala.concurrent.Future[org.bitcoins.node.Node]" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">start</span><span class="params">()</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/concurrent/Future.html#scala.concurrent.Future" name="scala.concurrent.Future" id="scala.concurrent.Future" class="extype">Future</a>[<a href="" name="org.bitcoins.node.Node" id="org.bitcoins.node.Node" class="extype">Node</a>]</span></span><p class="shortcomment cmt">Starts our node</p></li><li class="indented0 " name="org.bitcoins.node.Node#stop" group="Ungrouped" fullComment="no" data-isabs="false" visbl="pub"><a id="stop():scala.concurrent.Future[org.bitcoins.node.Node]" class="anchorToMember"></a><a id="stop():Future[Node]" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#stop():scala.concurrent.Future[org.bitcoins.node.Node]" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">stop</span><span class="params">()</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/concurrent/Future.html#scala.concurrent.Future" name="scala.concurrent.Future" id="scala.concurrent.Future" class="extype">Future</a>[<a href="" name="org.bitcoins.node.Node" id="org.bitcoins.node.Node" class="extype">Node</a>]</span></span><p class="shortcomment cmt">Stops our node</p></li><li class="indented0 " name="org.bitcoins.node.Node#sync" group="Ungrouped" fullComment="no" data-isabs="false" visbl="pub"><a id="sync():scala.concurrent.Future[Unit]" class="anchorToMember"></a><a id="sync():Future[Unit]" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#sync():scala.concurrent.Future[Unit]" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">sync</span><span class="params">()</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/concurrent/Future.html
If our local best block hash is the same as our peers
we will not sync, otherwise we will keep syncing
until our best block hashes match up
</p></li><li class="indented0 " name="scala.AnyRef#synchronized" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="synchronized[T0](x$1:=&gt;T0):T0" class="anchorToMember"></a><a id="synchronized[T0](=&gt;T0):T0" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#synchronized[T0](x$1:=&gt;T0):T0" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier">final </span> <span class="kind">def</span></span> <span class="symbol"><span class="name">synchronized</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="params">(<span name="arg0">arg0: =&gt; <span name="java.lang.AnyRef.synchronized.T0" class="extype">T0</span></span>)</span><span class="result">: <span name="java.lang.AnyRef.synchronized.T0" class="extype">T0</span></span></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div></li><li class="indented0 " name="scala.AnyRef#toString" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="pub"><a id="toString():String" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#toString():String" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">toString</span><span class="params">()</span><span class="result">: <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java/lang/String.html#java.lang.String" name="java.lang.String" id="java.lang.String" class="extype">String</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div></li><li class="indented0 " name="grizzled.slf4j.Logging#trace" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="prt"><a id="trace(mkr:org.slf4j.Marker,msg:=&gt;Any,t:=&gt;Throwable):Unit" class="anchorToMember"></a><a id="trace(Marker,=&gt;Any,=&gt;Throwable):Unit" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#trace(mkr:org.slf4j.Marker,msg:=&gt;Any,t:=&gt;Throwable):Unit" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">trace</span><span class="params">(<span name="mkr">mkr: <a href="https://javadoc.io/page/org.slf4j/slf4j-api/1.7.30/org/slf4j/Marker.html#org.slf4j.Marker" name="org.slf4j.Marker" id="org.slf4j.Marker" class="extype">Marker</a></span>, <span name="msg">msg: =&gt; <a href="https://www.scala-lang.org/api/2.13.6/scala/Any.html#scala.Any" name="scala.Any" id="scala.Any" class="extype">Any</a></span>, <span name="t">t: =&gt; <a href="../../../scala/index.html#Throwable=Throwable" name="scala.Throwable" id="scala.Throwable" class="extmbr">Throwable</a></span>)</span><span class="result">: <a href="https://www.scala-lang.org/api/2.13.6/scala/Unit.html#scala.Unit" name="scala.Unit" id="scala.Unit" class="extype">Unit</a></span></span><div class="fullcomment"><dl class="attributes block"><dt>Attributes</dt><dd>protected </dd><dt>Definition Classes</dt><dd>Logging</dd></dl></div></li><li class="indented0 " name="grizzled.slf4j.Logging#trace" group="Ungrouped" fullComment="yes" data-isabs="false" visbl="prt"><a id="trace(msg:=&gt;Any,t:=&gt;Throwable):Unit" class="anchorToMember"></a><a id="trace(=&gt;Any,=&gt;Throwable):Unit" class="anchorToMember"></a> <span class="permalink"><a href="../../../org/bitcoins/node/Node.html#trace(msg:=&gt;Any,t:=&gt;Throwable):Unit" title="Permalink"><i class="material-icons"></i></a></span> <span class="modifier_kind"><span class="modifier"></span> <span class="kind">def</span></span> <span class="symbol"><span class="name">trace</span><span class="params">(<span name="msg">msg: =&gt; <a href="https://www.scala-lang.org/api/2.13.6/scala/Any.html#scala.Any" name="scala