BuildOnViction/tomochain-v1

SDK Fullnode panic

thanhnguyennguyen opened this issue · 2 comments

Steps to reproduces:

  • Point ws_url in SDK DEX configuration to websocket of fullnode
  • Navigate to SDK UI, login with privatekey
    -> SDK fullnode panic
    image

Note: everything is ok if we point ws_url to websocket of masternode

cc @pqv199x

A fullnode is not a masternode(cannot commit transaction), so it does not have enough configures such as coinbase address... to run some APIs.

  1. Turn on AnnounceTxsFlag, --announce-txs, fullnode will try to commit tx as a masternode
    Or:
  2. Turn off option Pending(tomox-sdk):
    opts := &bind.CallOpts{Pending: true}
    when calling API. This changing will force API function get state of latest block number instead of pending block number(API throws errors if AnnounceTxsFlag is not set)

thank Vu 🙇‍♂️