type controlAction struct {
accounts *Manager
bc.AssetAmount
- AccountID string `json:"account_id"`
+ AccountID string `json:"account_id"`
}
func (a *controlAction) Build(ctx context.Context, b *txbuilder.TemplateBuilder) error {
log "github.com/sirupsen/logrus"
"github.com/bytom/blockchain/query"
- "github.com/bytom/wallet"
"github.com/bytom/consensus/difficulty"
chainjson "github.com/bytom/encoding/json"
"github.com/bytom/protocol/bc"
"github.com/bytom/protocol/bc/types"
+ "github.com/bytom/wallet"
)
-
// return best block hash
func (a *API) getBestBlockHash() Response {
blockHash := map[string]string{"blockHash": a.chain.BestBlockHash().String()}
blockHeight := map[string]uint64{"block_count": a.chain.Height()}
return NewSuccessResponse(blockHeight)
}
-
log "github.com/sirupsen/logrus"
- "github.com/bytom/errors"
"github.com/bytom/blockchain/txfeed"
+ "github.com/bytom/errors"
)
// POST /create-txfeed
quitSync: make(chan struct{}),
newBlockCh: newBlockCh,
newPeerCh: make(chan struct{}),
- txSyncCh: make(chan *txsync),
+ txSyncCh: make(chan *txsync),
dropPeerCh: make(chan *string, maxQuitReq),
peers: newPeerSet(),
}
package netsync
import (
+ "math/rand"
"sync/atomic"
"time"
- "math/rand"
log "github.com/sirupsen/logrus"
)
type rawOutput struct {
- OutputID bc.Hash
+ OutputID bc.Hash
bc.AssetAmount
ControlProgram []byte
txHash bc.Hash
continue
}
- if statusFail, _ := txStatus.GetStatus(txIndex);
- statusFail && *resOut.Source.Value.AssetId != *consensus.BTMAssetID {
+ if statusFail, _ := txStatus.GetStatus(txIndex); statusFail && *resOut.Source.Value.AssetId != *consensus.BTMAssetID {
continue
}