0

如果我想从 XO 家族获取数据,我会

ubuntu@ip-172-31-46-61:~$ curl http://127.0.0.1:8008/state?address=5b7349
{
  "data": [
    {
      "address": "5b73495267768822ee624d48fce15ec5ca79cbd602cb7f4c2157a516556991f22ef8c7",
      "data": "YiwtLS0tLS0tLS0sUDEtTkVYVCws"
    }
  ],
  "head": "45915c727658ff63ff99a471becfb9f5d98fbd9827c3d31d608326fa369bb66024163807ce2d5d01f652da3ef53f47113af881a6cd766158e084a777c081310c",
  "link": "http://127.0.0.1:8008/state?head=45915c727658ff63ff99a471becfb9f5d98fbd9827c3d31d608326fa369bb66024163807ce2d5d01f652da3ef53f47113af881a6cd766158e084a777c081310c&start=5b73495267768822ee624d48fce15ec5ca79cbd602cb7f4c2157a516556991f22ef8c7&limit=100&address=5b7349",
  "paging": {
    "limit": null,
    "start": null
  }

这很好用,但是如果我尝试自己请求:

ubuntu@ip-172-31-46-61:~$ curl http://127.0.0.1:8008/state?address=769c10                                                                                                    
{
  "data": [
    {
      "address": "769c10c1a09d05cf2b232ea60cd2fecf7fd0ac3358dafa7208ef751bc76bd59f98253d",
      "data": ""
    }
  ],
  "head": "45915c727658ff63ff99a471becfb9f5d98fbd9827c3d31d608326fa369bb66024163807ce2d5d01f652da3ef53f47113af881a6cd766158e084a777c081310c",
  "link": "http://127.0.0.1:8008/state?head=45915c727658ff63ff99a471becfb9f5d98fbd9827c3d31d608326fa369bb66024163807ce2d5d01f652da3ef53f47113af881a6cd766158e084a777c081310c&start=769c10c1a09d05cf2b232ea60cd2fecf7fd0ac3358dafa7208ef751bc76bd59f98253d&limit=100&address=769c10",
  "paging": {
    "limit": null,
    "start": null
  }

但我的交易在区块链中:

curl http://127.0.0.1:8008/blocks
         "transactions": [
            {
              "header": {
                "batcher_public_key": "023e3dfe1542ae5365c1429f62976f240f40acc792459489e9ad7a1261f96b6505",
                "dependencies": [],
                "family_name": "dk",
                "family_version": "1.0",
                "inputs": [
                  "769c10b4710e7d032d41f6b30dc72b3047b6b4573b0099be52e6d28f5aaa711f00c48d"
                ],
                "nonce": "0xaa4148f543e063dc",
                "outputs": [
                  "769c10b4710e7d032d41f6b30dc72b3047b6b4573b0099be52e6d28f5aaa711f00c48d"
                ],
                "payload_sha512": "430813da0388e5ca52abe3c64e61cb36c7214a3fa0ca40bd2eb9eecca0148e68bd02c7bea821c9832fa40db4ad84ba0412ccff8de11416481d75c58286ab5d37",
                "signer_public_key": "023e3dfe1542ae5365c1429f62976f240f40acc792459489e9ad7a1261f96b6505"
              },
              "header_signature": "227c132f307e580189fde4787c64c185eedab7bba7d14ae5668b1c94769868a80fe7a3aec9298284bd0315ef565adaf90469f39cee900c1137556729f57f38ee",
              "payload": "NWZhMTEsY3JlYXRlLDAsYWY1MixhNWYzLGE0ZjU2"
            }
          ]

我的有效载荷列在区块链中。我究竟做错了什么?

4

1 回答 1

1

您的交易似乎失败了。仅仅因为你的有效载荷在区块链中并不意味着它进入了状态。

尝试运行sawtooth state list以查看当前状态的所有内容。

于 2019-01-03T23:15:52.390 回答