background: handle fee transaction doublespends (#164)
This commit is contained in:
parent
6cc246ceea
commit
de9c6b428e
3
.github/workflows/go.yml
vendored
3
.github/workflows/go.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
|||||||
- name: Check out source
|
- name: Check out source
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Install Linters
|
- 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
|
- name: Build
|
||||||
env:
|
env:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
@ -24,5 +24,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
run: |
|
run: |
|
||||||
export PATH=${PATH}:$(go env GOPATH)/bin
|
|
||||||
./run_tests.sh
|
./run_tests.sh
|
||||||
@ -164,6 +164,13 @@ func blockConnected() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("%s: dcrd.GetRawTransaction for fee tx failed (feeTxHash=%s, ticketHash=%s): %v",
|
log.Errorf("%s: dcrd.GetRawTransaction for fee tx failed (feeTxHash=%s, ticketHash=%s): %v",
|
||||||
funcName, ticket.FeeTxHash, ticket.Hash, err)
|
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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user