Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - sbwdlihao

#1
i have called wallet_transfer successfully in php
try{
$tx = $rpc->wallet_transfer(12, "XTS", "acc-51btc", "lihao-test1");
}catch(Exception $e){
echo sprintf("error %s\n", $e->getMessage());
};


and the result is
Array [4]   
   expiration   (string:15) 20140710T102525   
   delegate_slate_id   null   
   operations   Array [2]   
      0   Array [2]   
         type   (string:16) withdraw_op_type   
         data   Array [3]   
            balance_id   (string:36) XTSNWJpomfWVhvd7PM8QMMxnbmc8rNNg6C86   
            amount   (int) 1210000   
            claim_input_data   (string:0)    
      1   Array [2]   
         type   (string:15) deposit_op_type   
         data   Array [2]   
            amount   (int) 1200000   
            condition   Array [4]   
               asset_id   (int) 0   
               delegate_slate_id   (int) 0   
               type   (string:23) withdraw_signature_type   
               data   Array [2]   
                  owner   (string:36) XTSJL1fTtNg8LQbLPw33LKrHJKRpEsayNCG4   
                  memo   Array [2]   
                     one_time_key   (string:53) XTS7sxksh6uXuELNAaawFsC7V2Qu5Kt7dWj51KnCrLmzcJi4gbvu7   
                     encrypted_memo_data   (string:128) 6279c02e653b21d7c25d7a818a1f2badfe36861ff73fa53e9d3396416e9493a3ca539c0528d2353ef62692cd33a9043694adc57429f8e5081152b5ad94d6ab4f   
   signatures   Array [1]   
      0   (string:130) 207343a0001159d526f358caca89cc32a935ec84c5ee2c3a873a2cffa1b94998f15b7fadd940e84dc2902f7c774682bd5f6c4accaed87934da9de2292504e9e894   

i don't find the tx id, so i think i could use wallet_get_pretty_transaction to parse the result to get tx id

this is the wallet_transfer introduction
{
        "method_name": "wallet_transfer",
        "description": "Sends given amount to the given address, assumes shares in DAC.  This transfer will occur in a single transaction and will be cheaper, but may reduce your privacy.",
        "return_type": "signed_transaction",
        "parameters" :
          [
            {
              "name" : "amount_to_transfer",
              "type" : "real_amount",
              "description" : "the amount of shares to transfer"
            },
            {
              "name" : "asset_symbol",
              "type" : "asset_symbol",
              "description" : "the asset to transfer"
            },
            {
              "name" : "from_account_name",
              "type" : "sending_account_name",
              "description" : "the source account(s) to draw the shares from"
            },
            {
              "name" : "to_account_name",
              "type" : "receive_account_name",
              "description" : "the account to transfer the shares to"
            },
            {
              "name" : "memo_message",
              "type" : "string",
              "description" : "a memo to store with the transaction",
              "default_value" : ""
            }
          ],
        "prerequisites" : ["wallet_unlocked"],
        "aliases" : ["transfer"]
      },


and wallet_get_pretty_transaction introduction
{
        "method_name": "wallet_get_pretty_transaction",
        "description": "Return a pretty JSON representation of a transaction",
        "return_type": "pretty_transaction",
        "parameters" :
          [
            {
              "name" : "transaction",
              "type" : "signed_transaction",
              "description" : "the transaction to pretty-print"
            }
          ],
        "is_const" : true,
        "prerequisites" : ["json_authenticated"]
      }


so, i tried
$r = $rpc->wallet_get_pretty_transaction($tx);
and
$r = $rpc->wallet_get_pretty_transaction(json_encode($tx));
both failed

i find signed_transaction structure in transaction.hpp
struct signed_transaction : public transaction
   {
      transaction_id_type                     id()const;
      size_t                                  data_size()const;
      void                                    sign( const fc::ecc::private_key& signer, const digest_type& chain_id );

      vector<fc::ecc::compact_signature> signatures;
   };

and i am coufused, beacuse i counldn't find transaction_id_type in the result of wallet_transfer

can any one help me with this problem please?how to get tx id from the result of wallet_transfer?
#2
General Discussion / Re: Dry Run 8: Need for Speed
July 09, 2014, 03:11:09 PM
Fund me please
XTS7qqAxq9ycyugUxWbGAe55uwrMHECqefssaiNW4KoKd87QiRvXH
#3
Quote from: Webber on July 04, 2014, 02:34:24 PM
Quote from: sbwdlihao on July 04, 2014, 02:05:53 PM
请问楼主我在Ubuntu下编译成功,也运行起来了,创建账户等等都没有问题,但是同步不了数据,我的Ubuntu装在虚拟机上,能连外网,也能ping通config里面的节点ip。

你运行的那个文件?

问题解决了,因为我的主机开着一个客户端占用了8701端口,所以虚拟机的客户端没法绑定8701端口,所以同步不了
#4
请问楼主我在Ubuntu下编译成功,也运行起来了,创建账户等等都没有问题,但是同步不了数据,我的Ubuntu装在虚拟机上,能连外网,也能ping通config里面的节点ip。
#5
Quote from: xeroc on July 04, 2014, 12:09:54 PM
Could you please go through netiquette ... It's difficult to answer questions when they are not properly defined

- I guess you are refering to PTS
- this has been discusses SEVERAL times already -> search function of the board
- we (and no one else here) do not have a way to define which blocks are included in the blocks its the task of the miners/pool operators!
- PTS will eventually be migrated to DPOS which solves the issue completly

if you are referencing to the bitshares_toolkit:
- that's ok .. no tx are included if there are none .. blocks are then empty as no new 'coins' are mined!

o, thank you, i forgot bitshares_toolkit running for test now and no transactions in a block is normal