Commit d5cbda58 authored by David Vorick's avatar David Vorick

get build passing again

parent 5aea86f7
......@@ -75,7 +75,7 @@ test:
test-v:
go test -race -v -short -tags='debug testing' -timeout=15s $(pkgs) -run=$(run)
test-long: clean fmt vet lint
go test -v -race -tags='testing debug' -timeout=20s $(pkgs) -run=$(run)
go test -v -race -tags='testing debug' -timeout=500s $(pkgs) -run=$(run)
bench: clean fmt
go test -tags='testing' -timeout=500s -run=XXX -bench=. $(pkgs)
cover: clean
......
......@@ -71,7 +71,7 @@ func (h *Host) initRescan() error {
})
// Re-queue all of the action items for the storage obligations.
for _, so := range allObligations {
for i, so := range allObligations {
soid := so.id()
err1 := h.queueActionItem(h.blockHeight+resubmissionTimeout, soid)
err2 := h.queueActionItem(so.expiration()-revisionSubmissionBuffer, soid)
......@@ -81,12 +81,12 @@ func (h *Host) initRescan() error {
h.log.Println("dropping storage obligation during rescan, id", so.id())
}
go func() {
err := h.tpool.AcceptTransactionSet(so.OriginTransactionSet)
go func(i int) {
err := h.tpool.AcceptTransactionSet(allObligations[i].OriginTransactionSet)
if err != nil {
h.log.Println("Unable to submit contract transaction set after rescan:", soid)
}
}()
}(i)
}
return nil
}
......
......@@ -202,7 +202,7 @@ func (c *Contractor) managedFormAllowanceContracts(n int, numSectors uint64, a m
return err
}
// Set the allowance and replace the contract set
// Set the allowance and update the contract set
c.mu.Lock()
c.allowance = a
for i, contract := range formed {
......
......@@ -20,7 +20,7 @@ type offlineHostDB struct {
// host's scan history will be modified to make the host appear offline.
func (hdb offlineHostDB) Host(spk types.SiaPublicKey) (modules.HostDBEntry, bool) {
host, ok := hdb.hostDB.Host(spk)
if ok {
if ok && string(spk.Key) == string(hdb.spk.Key) {
// fake three scans over the past uptimeWindow, all of which failed
badScan1 := modules.HostDBScan{Timestamp: time.Now().Add(-uptimeWindow * 2), Success: false}
badScan2 := modules.HostDBScan{Timestamp: time.Now().Add(-uptimeWindow), Success: false}
......
......@@ -389,7 +389,7 @@ func TestSiaPublicKeyLoadString(t *testing.T) {
spk.LoadString(parts[1])
spk.LoadString(parts[1][1:])
spk.LoadString(parts[1][:1])
spk.LoadString(parts[0]+parts[1])
spk.LoadString(parts[0] + parts[1])
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment