background: handle fee transaction doublespends (#164)

This commit is contained in:
David Hill 2020-07-31 07:55:28 +00:00 committed by GitHub
parent 6cc246ceea
commit de9c6b428e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -15,7 +15,7 @@ jobs:
- name: Check out source
uses: actions/checkout@v2
- name: Install Linters
run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.28.0"
run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.29.0"
- name: Build
env:
GO111MODULE: "on"
@ -24,5 +24,4 @@ jobs:
env:
GO111MODULE: "on"
run: |
export PATH=${PATH}:$(go env GOPATH)/bin
./run_tests.sh

View File

@ -164,6 +164,13 @@ func blockConnected() {
if err != nil {
log.Errorf("%s: dcrd.GetRawTransaction for fee tx failed (feeTxHash=%s, ticketHash=%s): %v",
funcName, ticket.FeeTxHash, ticket.Hash, err)
ticket.FeeTxStatus = database.FeeError
err = db.UpdateTicket(ticket)
if err != nil {
log.Errorf("%s: db.UpdateTicket error, failed to set fee tx status to error (ticketHash=%s): %v",
funcName, ticket.Hash, err)
}
continue
}