Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

WIP: Fix host counter #2884

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Mar 16, 2018

  1. Move the updating of financial metrics to the end of the function. Wh…

    …en this function is called multiple times from negotiate.go line 252, this prevents adding values multiple times.
    nielscastien committed Mar 16, 2018
    Configuration menu
    Copy the full SHA
    e15c6d8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9d08da8 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2018

  1. Revert "Make sure the contract counter is only increased when it is a…

    … new contract and not a renewal"
    
    This reverts commit 9d08da8.
    
    Contract counter should be increased as it is forming a new obligation
    for new contracts as well for renewals.
    nielscastien committed Mar 17, 2018
    Configuration menu
    Copy the full SHA
    93339cf View commit details
    Browse the repository at this point in the history
  2. Revert "Move the updating of financial metrics to the end of the func…

    …tion. When this function is called multiple times from negotiate.go line 252, this prevents adding values multiple times."
    
    This reverts commit e15c6d8.
    
    When there is an error with the queuing of the action items, the storage obligation will be removed with status 'obligationRejected' and the function will return. Placing the financial metrics update at the end of the function will
    in this case never be reached.
    nielscastien committed Mar 17, 2018
    Configuration menu
    Copy the full SHA
    3beda72 View commit details
    Browse the repository at this point in the history
  3. Add SectorRoots outside the database update. If this function fails,

    there is nothing to revert.
    nielscastien committed Mar 17, 2018
    Configuration menu
    Copy the full SHA
    d553d83 View commit details
    Browse the repository at this point in the history
  4. Make the database update function revert any changes in case of an er…

    …ror.
    
    Financial metrics are only updated when there are no errors.
    nielscastien committed Mar 17, 2018
    Configuration menu
    Copy the full SHA
    5585cf0 View commit details
    Browse the repository at this point in the history
  5. Remove storage obligation with status obligationRejected when the

    AcceptTransactionSet call returns with an error.
    
    This should reset the host to the original state. However, the rejected storage
    obligation will stay in the database as rejected without SectorRoots.
    nielscastien committed Mar 17, 2018
    Configuration menu
    Copy the full SHA
    76d87f5 View commit details
    Browse the repository at this point in the history