anchor.diff:      Ch2 = channel_block_tx:update(Ch, A, N),
       Acc1 = channels:acc1(Channel),
       Acc2 = channels:acc2(Channel),
  -    io:fwrite("\nchannel manager a "),
  -    io:fwrite(integer_to_list(A)),
  -    io:fwrite("\n"),
       ID = keys:id(),
       ToAmount = if
   	Spend -> 
  
positive.code:             Acc2 -> 0
          end,
      Script = language:hashlock(MyAccount, SecretHash),
  
      io:fwrite("\n"),
      io:fwrite("old ch "),
      io:fwrite(packer:pack(Ch)),
      io:fwrite("\n"),
      io:fwrite("new ch"),
      io:fwrite(packer:pack(Ch2)),
      io:fwrite("\n"),
      io:fwrite("a "),
      io:fwrite(integer_to_list(Amount div 2)),
      io:fwrite("\n"),
      io:fwrite("script "),
      io:fwrite(packer:pack(Script)),
      io:fwrite("\n"),
  
  
      keys:sign(channel_block_tx:add_bet(Ch2, Amount div 2, Script)).
  %NewF = #f{channel = Ch3, unlock = [[1]|F#f.unlock]},
  %store(ChId, NewF).
  
negative.code:     store(ChId, NewF).
  hashlock(ChId, Amount, SecretHash) ->
      F = read(ChId),
      Ch = sign:data(F#f.channel),
      Ch2 = channel_block_tx:update(Ch, Amount div 2, 1),
      Channel = block_tree:channel(ChId),
  