Skip to content

Commit

Permalink
Merge pull request #600 from thecodefactory/fetch-block
Browse files Browse the repository at this point in the history
Add fetch-block command and test
  • Loading branch information
thecodefactory authored Oct 5, 2018
2 parents 4341f9a + 3f7ca25 commit 6cf1f35
Show file tree
Hide file tree
Showing 23 changed files with 520 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ src_libbitcoin_explorer_la_SOURCES = \
src/commands/electrum-new.cpp \
src/commands/electrum-to-seed.cpp \
src/commands/fetch-balance.cpp \
src/commands/fetch-block.cpp \
src/commands/fetch-header.cpp \
src/commands/fetch-height.cpp \
src/commands/fetch-history.cpp \
Expand Down Expand Up @@ -218,6 +219,7 @@ test_libbitcoin_explorer_test_SOURCES = \
test/commands/electrum-new.cpp \
test/commands/electrum-to-seed.cpp \
test/commands/fetch-balance.cpp \
test/commands/fetch-block.cpp \
test/commands/fetch-header.cpp \
test/commands/fetch-height.cpp \
test/commands/fetch-history.cpp \
Expand Down Expand Up @@ -339,6 +341,7 @@ include_bitcoin_explorer_commands_HEADERS = \
include/bitcoin/explorer/commands/electrum-new.hpp \
include/bitcoin/explorer/commands/electrum-to-seed.hpp \
include/bitcoin/explorer/commands/fetch-balance.hpp \
include/bitcoin/explorer/commands/fetch-block.hpp \
include/bitcoin/explorer/commands/fetch-header.hpp \
include/bitcoin/explorer/commands/fetch-height.hpp \
include/bitcoin/explorer/commands/fetch-history.hpp \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<ClCompile Include="..\..\..\..\test\commands\electrum-new.cpp" />
<ClCompile Include="..\..\..\..\test\commands\electrum-to-seed.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-balance.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-block.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-header.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-height.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-history.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
<ClCompile Include="..\..\..\..\test\commands\fetch-balance.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\commands\fetch-block.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\commands\fetch-header.cpp">
<Filter>src\commands</Filter>
</ClCompile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<ClCompile Include="..\..\..\..\src\commands\electrum-new.cpp" />
<ClCompile Include="..\..\..\..\src\commands\electrum-to-seed.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-balance.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-block.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-header.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-height.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-history.cpp" />
Expand Down Expand Up @@ -232,6 +233,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\electrum-new.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\electrum-to-seed.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-balance.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-block.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-header.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-height.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-history.hpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<ClCompile Include="..\..\..\..\src\commands\fetch-balance.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\commands\fetch-block.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\commands\fetch-header.cpp">
<Filter>src\commands</Filter>
</ClCompile>
Expand Down Expand Up @@ -512,6 +515,9 @@
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-balance.hpp">
<Filter>include\bitcoin\explorer\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-block.hpp">
<Filter>include\bitcoin\explorer\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-header.hpp">
<Filter>include\bitcoin\explorer\commands</Filter>
</ClInclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<ClCompile Include="..\..\..\..\test\commands\electrum-new.cpp" />
<ClCompile Include="..\..\..\..\test\commands\electrum-to-seed.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-balance.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-block.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-header.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-height.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-history.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
<ClCompile Include="..\..\..\..\test\commands\fetch-balance.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\commands\fetch-block.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\commands\fetch-header.cpp">
<Filter>src\commands</Filter>
</ClCompile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<ClCompile Include="..\..\..\..\src\commands\electrum-new.cpp" />
<ClCompile Include="..\..\..\..\src\commands\electrum-to-seed.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-balance.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-block.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-header.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-height.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-history.cpp" />
Expand Down Expand Up @@ -232,6 +233,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\electrum-new.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\electrum-to-seed.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-balance.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-block.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-header.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-height.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-history.hpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<ClCompile Include="..\..\..\..\src\commands\fetch-balance.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\commands\fetch-block.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\commands\fetch-header.cpp">
<Filter>src\commands</Filter>
</ClCompile>
Expand Down Expand Up @@ -512,6 +515,9 @@
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-balance.hpp">
<Filter>include\bitcoin\explorer\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-block.hpp">
<Filter>include\bitcoin\explorer\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-header.hpp">
<Filter>include\bitcoin\explorer\commands</Filter>
</ClInclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<ClCompile Include="..\..\..\..\test\commands\electrum-new.cpp" />
<ClCompile Include="..\..\..\..\test\commands\electrum-to-seed.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-balance.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-block.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-header.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-height.cpp" />
<ClCompile Include="..\..\..\..\test\commands\fetch-history.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
<ClCompile Include="..\..\..\..\test\commands\fetch-balance.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\commands\fetch-block.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\commands\fetch-header.cpp">
<Filter>src\commands</Filter>
</ClCompile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<ClCompile Include="..\..\..\..\src\commands\electrum-new.cpp" />
<ClCompile Include="..\..\..\..\src\commands\electrum-to-seed.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-balance.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-block.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-header.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-height.cpp" />
<ClCompile Include="..\..\..\..\src\commands\fetch-history.cpp" />
Expand Down Expand Up @@ -232,6 +233,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\electrum-new.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\electrum-to-seed.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-balance.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-block.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-header.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-height.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-history.hpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<ClCompile Include="..\..\..\..\src\commands\fetch-balance.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\commands\fetch-block.cpp">
<Filter>src\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\src\commands\fetch-header.cpp">
<Filter>src\commands</Filter>
</ClCompile>
Expand Down Expand Up @@ -512,6 +515,9 @@
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-balance.hpp">
<Filter>include\bitcoin\explorer\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-block.hpp">
<Filter>include\bitcoin\explorer\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\explorer\commands\fetch-header.hpp">
<Filter>include\bitcoin\explorer\commands</Filter>
</ClInclude>
Expand Down
1 change: 1 addition & 0 deletions data/bx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ _bx()
electrum-new
electrum-to-seed
fetch-balance
fetch-block
fetch-header
fetch-height
fetch-history
Expand Down
1 change: 1 addition & 0 deletions include/bitcoin/explorer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include <bitcoin/explorer/commands/electrum-new.hpp>
#include <bitcoin/explorer/commands/electrum-to-seed.hpp>
#include <bitcoin/explorer/commands/fetch-balance.hpp>
#include <bitcoin/explorer/commands/fetch-block.hpp>
#include <bitcoin/explorer/commands/fetch-header.hpp>
#include <bitcoin/explorer/commands/fetch-height.hpp>
#include <bitcoin/explorer/commands/fetch-history.hpp>
Expand Down
Loading

0 comments on commit 6cf1f35

Please sign in to comment.