2

enter image description here

Unable to get the signature in the table,But you can get the signature type from the parameters of the interface.They should be the same type.How should I get the correct push from the table?

client
  .connect()
  .then(() => {
    client.getTableRows({code:'pokereoshold', scope:'pokereoshold', table: 'gameinfo', json: true})
    .onMessage((message) => {
      if(message.data.dbop != undefined) {
        if (message.type === InboundMessageType.TABLE_DELTA) {
          if(message.data.dbop.new != undefined){
            console.log('222 \n', JSON.stringify(message.data.dbop.new));
          }
        }
      }
    });
    client.getActionTraces({ account: "pokereoshold", action_name: "reveal" })
    .onMessage((message) => {
      if (message.type === InboundMessageType.ACTION_TRACE) {
         console.log('\n\n111', JSON.stringify(message.data.trace));
      }
    })
  }
  )
  .catch((error) => {
    console.log("Unable to connect to dfuse endpoint.", error)
  })

this is my contract code

auto t_data = make_tuple(string("Holdem"), itr->bet_id, itr->player, itr->bet_asset, games.payout, itr->seed, itr->seed_hash \
                , games.sig, centercards, playercard, dealercard);
action(permission_level{ _self, N(active) }, _self, N(reveal), t_data).send();

auto gameitr = _games.find(itr->player);
if(gameitr == _games.end()) {
    _games.emplace(_self, [&](auto& info) {
        info = games;
    });
} else {
    _games.modify(gameitr, 0, [&](auto& info) {
        info = games;
    });
}

As you can see from https://eosq.app, I only wrote one table in my contract.

my contract "pokereoshold" and table "gameinfo" Now running 10 seconds at a time

From https://www.eosx.io/account/pokereoshold?mode=contract&sub=tables&table=gameinfo&lowerBound=&upperBound=&limit=100 this connection can see the table, player = chenzhenfeng, every data in the table, every 10 seconds Will be new, but the content pushed by dfuse websocket is incorrect, only the signature is zero, the others are correct

6
  • 1
    Please use the code function of StackExchange instead of posting images. Other users will better find your question and it may load faster.
    – tmm
    Jan 18, 2019 at 9:04
  • 1
    Maybe related
    – tmm
    Jan 18, 2019 at 9:07
  • 1
    Can you provide a link to a transaction that created such a message? I'm curious to see the raw data. The signature with a bunch of 1 you see there, is the normal serialization for a signature full of zeros. It would simply mean it's empty.. no signature at all.
    – abourget
    Jan 18, 2019 at 15:04
  • 1
    Also, tag the question with #dfuse so we can find it faster :)
    – abourget
    Jan 18, 2019 at 15:09
  • 1
    I'm looking at eosq.app/tx/… and things seem in order (DB operations have the sig unpacked properly). Since eosq is backed by dfuse, finding a page on eosq where the problem shows will help us pinpoint the issue very fast. This page also seems okay: eosq.app/account/pokereoshold/… Please advise, or join our Telegram channel t.me/dfuseAPI
    – abourget
    Jan 18, 2019 at 19:31

1 Answer 1

0

There was a bug in dfuse API where signature binary data was not properly decoded leading to a default signature to be returned.

As of today (Januaray 20th, 2019), the bug has been fixed and deployed. So this should not happen anymore.

Not the answer you're looking for? Browse other questions tagged or ask your own question.