anchor.diff:  %% @hidden
   update_session1(Type, Charge, Reserve, Now, ServiceId, ChargingKey, SessionId,
   		[#bucket{units = Type, remain_amount = Remain,
  -		attributes = Attributes} = B | T], Acc, Charged, Reserved)
  +		attributes = #{bucket_type := session}} = B | T], Acc, Charged, Reserved)
   		when ((Charge > Charged) or (Reserve > Reserved)), Remain > 0 ->
  +	Attributes = B#bucket.attributes,
   	#{reservations := Reservations} = Attributes,
   	NewCharge = Charge - Charged,
   	NewReserve = Reserve - Reserved,
  
positive.code: 	{Charged + Charge, lists:reverse(Acc) ++ NewBuckets};
  charge_session1(Type, Charge, Now, ServiceId, ChargingKey, SessionId,
  		[#bucket{units = Type, remain_amount = R, end_date = Expires,
  		attributes = Attributes} = B | T], Acc, Charged)
  		when Charge > 0, R =< Charge, R > 0,
  		((Expires == undefined) or (Now < Expires)) ->
  	#{reservations := Reservations} = Attributes,
  	NewReservations = Reservations#{SessionId => #{ts => Now, debit => R,
  			reserve => 0, service_id => ServiceId, charging_key => ChargingKey}},
  
negative.code: 			ServiceId, ChargingKey, SessionId, T, Acc, Charged, Reserved);
  update_session(Type, Charge, Reserve, Now, ServiceId, ChargingKey, SessionId,
  		[#bucket{units = Type, remain_amount = Remain,
  		attributes = #{bucket_type := session}} = B | T], Acc, Charged, Reserved) ->
  	Attributes = B#bucket.attributes,
  	#{reservations := Reservations} = Attributes,
  	NewCharge = Charge - Charged,
  	NewReserve = Reserve - Reserved,
  