:: Re: [Libbitcoin] libitcoin examples…
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Eric Voskuil
Fecha:  
A: Shawn Pringle, libbitcoin
Asunto: Re: [Libbitcoin] libitcoin examples wrong
Hi Shawn,

Sorry I missed this. I was travelling at the time.

The information on unsystem is very dated. There is no libwallet as that
code was merged back in to libbitcoin. The latest release of libbitcoin
is version 2.9.0.

Please see: https://github.com/libbitcoin

e

On 07/14/2015 04:46 AM, Shawn Pringle wrote:
> Hello,
>
> I have noticed that the examples on the libbitcoin.dyne.org site do not
> compile with the libbitcoin that one can download from there.
>
> I am using 2.0 and libwallet 0.0. I downloaded from the said site and
> the examples. I made minor changes to two files.
>
> satoshiwords.cpp and determ.cpp
>
> The changes via GNU diff are:
>
> diff -u --ignore-space-change --ignore-blank-lines satoshiwords.cpp.orig
>  satoshiwords.cpp
> --- satoshiwords.cpp.orig       2015-07-14 07:01:48.000000000 -0300
> +++ satoshiwords.cpp    2015-07-14 08:44:04.000000000 -0300
> @@ -1,5 +1,6 @@
>  /*
>    Display the genesis block message by Satoshi.
> +  By Amir Taaki, et al at libbitcoin
>  */
>  #include <bitcoin/bitcoin.hpp>
>  using namespace bc;
> @@ -16,7 +17,7 @@
>      assert(coinbase_tx.inputs.size() == 1);
>      const transaction_input_type& coinbase_input = coinbase_tx.inputs[0];
>      // Get the input script (sometimes called scriptSig).
> -    const script& input_script = coinbase_input.input_script;
> +    const script_type& input_script = coinbase_input.script;
>      // Convert this to its raw format.
>      const data_chunk& raw_block_message = save_script(input_script);
>      // Convert this to an std::string.

>
> diff -u --ignore-space-change --ignore-blank-lines determ.{cpp.orig,cpp}
> --- determ.cpp.orig     2015-07-14 08:02:56.000000000 -0300
> +++ determ.cpp  2015-07-14 08:08:48.000000000 -0300
> @@ -1,9 +1,11 @@
>  #include <bitcoin/bitcoin.hpp>
> +#include <wallet/wallet.hpp>
> +#include <wallet/deterministic_wallet.hpp>
>  using namespace bc;

>
>  int main()
>  {
> -    deterministic_wallet wallet;
> +    libwallet::deterministic_wallet wallet;
>      // Set seed.
>      if (!wallet.set_seed("a219213f9b12422aa206d988e3e49607"))
>          log_error() << "Error setting seed.";
> @@ -32,7 +34,7 @@
>      assert(encode_hex(mpk) ==
> "d996c1a50ca4a57a9dface614338a1d837cb339e08361cfaf66ffd7da8e21786a7142a014056439d579654d7bb58dd5724b93372b5efae62e76783300f2b6cb5");

>
>      // A master key can only generate public keys and not the private keys.
> -    deterministic_wallet wallet2;
> +    libwallet::deterministic_wallet wallet2;
>      wallet2.set_master_public_key(mpk);
>      assert(wallet2.generate_public_key(2) == pubkey);
>      // Trying to generate the secret parameter will always return
> null_hash.

>
>
> Determ compiles but fails with a link error. Strangely enough the
> deterministic wallet is missing its implementation.
>
> sdp
> _______________________________________________
> Libbitcoin mailing list
> Libbitcoin@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/libbitcoin
>