Skip to content

Commit

Permalink
Merge pull request mvs-org#227 from jowenshaw/develop
Browse files Browse the repository at this point in the history
fix issue mvs-org#226 and modify README
  • Loading branch information
ventfang authored Jan 12, 2018
2 parents 8d7e335 + 21906ab commit c03e409
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ $ make install

optional:
```bash
$ make test
$ make doc
$ make test (should install boost_unit_test_framework)
$ make doc (should install doxygen and graphviz)
```
*Needs to configure Library Dependencies firstly.*

Expand Down Expand Up @@ -113,4 +113,21 @@ $ make -j4
$ sudo make install && sudo ldconfig
```

# Run MVS
After MVS is built successfully, there are two executable files in the _bin_ directory:

- **mvsd** - server program
Runs a full metaverse node in the global peer-to-peer network.

- **mvs-cli** - client program
Sent your request to the server, the server will process it and return response to your client.

Go to _bin_ diretory, and run the program.
More information please reference to [Command line usage](https://docs.mvs.org/docs/command-line.html) and [Configuration file](https://docs.mvs.org/docs/config-file.html).
```bash
$ cd bin
$ ./mvsd
$ ./mvs-cli $command $params $options
```

# [Run in docker](https://github.com/mvs-org/metaverse/tree/develop/builds/docker)
1 change: 1 addition & 0 deletions doc/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs.mvs.org
2 changes: 0 additions & 2 deletions include/metaverse/database/data_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
#include <metaverse/database/databases/blockchain_asset_database.hpp>
#include <metaverse/database/databases/address_asset_database.hpp>
#include <metaverse/database/databases/account_asset_database.hpp>
//#include <metaverse/bitcoin/wallet/payment_address.hpp>
#define LOG_DATABASE "database" // for log_debug output

using namespace libbitcoin::wallet;
using namespace libbitcoin::chain;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class validateaddress: public command_extension
)
(
"PAYMENT_ADDRESS",
value<bc::wallet::payment_address>(&argument_.address),
value<std::string>(&argument_.address),
"Valid payment address. If not specified the address is read from STDIN."
);

Expand All @@ -79,7 +79,7 @@ class validateaddress: public command_extension

struct argument
{
bc::wallet::payment_address address;
std::string address;
} argument_;

struct option
Expand Down
10 changes: 6 additions & 4 deletions src/lib/explorer/extensions/commands/validateaddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,20 @@ console_result validateaddress::invoke (Json::Value& jv_output,
libbitcoin::server::server_node& node)
{
std::string version_info;
std::string message{"valid address "};
std::string message{"valid address"};
bool is_valid{true};

auto& blockchain = node.chain_impl();
wallet::payment_address payment_address(argument_.address);

if (!blockchain.chain_settings().use_testnet_rules && argument_.address.version() == 0x32) {
if (!blockchain.chain_settings().use_testnet_rules && payment_address.version() == 0x32) {
version_info = "p2kh(main-net)";
} else if (blockchain.chain_settings().use_testnet_rules && argument_.address.version() == 0x7f ) {
} else if (blockchain.chain_settings().use_testnet_rules && payment_address.version() == 0x7f ) {
version_info = "p2kh(test-net)";
} else if (argument_.address.version() == 0x05 ) {
} else if (payment_address.version() == 0x05 ) {
version_info = "p2sh(multi-signature)";
} else {
version_info = "none";
message = "invalid address!";
is_valid = false;
}
Expand Down

0 comments on commit c03e409

Please sign in to comment.