anchor.diff:      %B = A * To -1,
       %true = (-A == (Amount div 2)),
       case To of
  -	1 -> true = (-A == (Amount div 2));
  -	0 -> true = (A == (Amount div 2))
  +	1 -> true = (A == (Amount div 2));
  +	0 -> true = (-A == (Amount div 2))
       end,
       ToAmount = 
   	case ID of
  
positive.code: 	end,
      D = fractions:multiply_int(C, A),
      NewNewCh = channel_block_tx:update(NewCh, D, 1),%
      %we need to change amount.
      {keys:sign(NewNewCh), N, BetCode}.
  create_unlock_hash(ChId, Secret) ->
  
negative.code:     NewBets = remove_nth(N, Bets),
      NewBets = remove_bet(hash:doit(BetCode), Bets),
      NewCh = channel_block_tx:replace_bet(OldCh, NewBets),
      %io:fwrite("with bet "),
      %io:fwrite(packer:pack(NewCh)),
      %io:fwrite("\n"),
  