:: Re: [Libbitcoin] v3 update
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Police Terror
日付:  
To: libbitcoin
題目: Re: [Libbitcoin] v3 update
I'm assuming that the script is not correct and will always fail.

BTW while making the C wrapper for libbitcoin, I didn't add the
namespaces. I think for the libbitcoin core library, that you don't need
all these namespaces like chain::, chain::script::, wallet::
They just encumber the library without adding anything. Sometimes it's
better to have a flat namespace with names like script_number instead of
chain::script.

Eric Voskuil:
> Can you find my bug below?
>
> :)
>
>> On Nov 7, 2016, at 3:47 PM, Neill Miller <neillm@???> wrote:
>>
>>> On Mon, Nov 07, 2016 at 02:25:31PM -0800, Eric Voskuil wrote:
>>> I've already inlined the interpreter and will soon inline the remaining utilities (operation, number, program). This will give the compiler to option to remove the call stack overhead during script processing, without losing the testability and readability benefits of well-factored code.
>>>
>>> Finally, recent changes now make it possible to run Bitcoin script as one would expect to run any program...
>>>
>>> // my program (false)
>>> operation::list ops
>>> {
>>>    { opcode::positive_2 },
>>>    { { 2 } },
>>>    { opcode::equal },
>>>    { opcode::not_ }
>>> };

>>>
>>> script foo(ops);
>>> program bar(foo, [environment]);
>>> auto result = bar.evaluate();
>>>
>>> If (result == error::success)
>>> {
>>>    // script completed
>>>    If (!program.stack_false())
>>>    {
>>>        // number 2 is not data 2
>>>    }
>>> }

>>
>> Very cool, nice work!
>>
>> -Neill.