]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cfg.go
On demand calling
[nncp.git] / src / cfg.go
index a72d371c141fecd588e8762fa2a758ece1ed18bd..946243396b7403c99aa499e22fd870a123516365 100644 (file)
@@ -81,6 +81,7 @@ type CallJSON struct {
        Addr           *string `json:"addr,omitempty"`
        OnlineDeadline *uint   `json:"onlinedeadline,omitempty"`
        MaxOnlineTime  *uint   `json:"maxonlinetime,omitempty"`
+       WhenTxExists   *bool   `json:"when-tx-exists,omitempty"`
 
        AutoToss       *bool `json:"autotoss,omitempty"`
        AutoTossDoSeen *bool `json:"autotoss-doseen,omitempty"`
@@ -280,6 +281,9 @@ func NewNode(name string, cfg NodeJSON) (*Node, error) {
                if callCfg.MaxOnlineTime != nil {
                        call.MaxOnlineTime = time.Duration(*callCfg.MaxOnlineTime) * time.Second
                }
+               if callCfg.WhenTxExists != nil {
+                       call.WhenTxExists = *callCfg.WhenTxExists
+               }
                if callCfg.AutoToss != nil {
                        call.AutoToss = *callCfg.AutoToss
                }