OSDN Git Service

clean
authorHAOYUatHZ <haoyu@protonmail.com>
Sun, 16 Jun 2019 02:18:57 +0000 (10:18 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Sun, 16 Jun 2019 02:18:57 +0000 (10:18 +0800)
federation/service/node.go
federation/warder.go

index 4dc0af0..7e7651c 100644 (file)
@@ -73,7 +73,7 @@ type submitTxResp struct {
        TxID string `json:"tx_id"`
 }
 
-func (n *Node) SubmitTx(tx interface{} /*, isMainchain bool*/) (string, error) {
+func (n *Node) SubmitTx(tx interface{}) (string, error) {
        url := "/submit-transaction"
        var payload []byte
        var err error
index 4ef9718..1e9c7d8 100644 (file)
@@ -194,14 +194,13 @@ func (w *warder) isLeader() bool {
        return false
 }
 
-// TODO: submit it
 func (w *warder) submitTx(destTx interface{}) (string, error) {
        switch tx := destTx.(type) {
        case *btmTypes.Tx:
-               return w.mainchainNode.SubmitTx(tx /*, true*/)
+               return w.mainchainNode.SubmitTx(tx)
 
        case *vaporTypes.Tx:
-               return w.sidechainNode.SubmitTx(tx /*, false*/)
+               return w.sidechainNode.SubmitTx(tx)
 
        default:
                return "", errors.New("unknown destTx type")