X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcmd%2Fnncp-caller%2Fmain.go;h=f7ab13c23299cc301608920776df84f417266042;hb=561313b1994a8fadac5152bbdc7a980881fd93e0;hp=826033c334526166c530c1c8330226dac055080c;hpb=0d9ff2108cd29c9b0afc6c5432ee8bf129ff0de2;p=nncp.git diff --git a/src/cmd/nncp-caller/main.go b/src/cmd/nncp-caller/main.go index 826033c..f7ab13c 100644 --- a/src/cmd/nncp-caller/main.go +++ b/src/cmd/nncp-caller/main.go @@ -134,6 +134,25 @@ func main() { node.Busy = true node.Unlock() + if call.WhenTxExists && call.Xx != "TRx" { + ctx.LogD("caller", sds, "checking tx existence") + txExists := false + for job := range ctx.Jobs(node.Id, nncp.TTx) { + job.Fd.Close() + if job.PktEnc.Nice > call.Nice { + continue + } + txExists = true + } + if !txExists { + ctx.LogD("caller", sds, "no tx") + node.Lock() + node.Busy = false + node.Unlock() + continue + } + } + var autoTossFinish chan struct{} var autoTossBadCode chan bool if call.AutoToss {