add submit check

pull/131/head
Minh Doan 6 years ago
parent 734d2106b0
commit 47056552dc
  1. 4
      .travis.gofmt.sh
  2. 1
      syncing/syncing.go

@ -1,9 +1,9 @@
#!/bin/bash
if [ -n "$(gofmt -l .)" ]; then
if [ -n "$(gofmt -l .)" -o $(golint ./... | wc | awk '{print $1}') -gt "2" ]; then
echo "Go code is not formatted:"
gofmt -d .
exit 1
else
echo "Go code is well formatted ;)"
fi
fi

@ -265,6 +265,7 @@ func (ss *StateSync) generateStateSyncTaskQueue(bc *blockchain.Blockchain) {
for id, blockHash := range configPeer.blockHashes {
if bc.Blocks[id] == nil || !reflect.DeepEqual(bc.Blocks[id].Hash[:], blockHash) {
ss.stateSyncTaskQueue.Put(SyncBlockTask{index: id, blockHash: blockHash})
// TODO(minhdoan): Check error
}
}
break

Loading…
Cancel
Save