replace host.maxContractLen with modules.MaxfileContractSetLen
host.maxContractLen was a misleading constant, it was not the file contract that was being checked for a size but the transaction set that contains all of the unconfirmed dependencies of the file contract. Because the constant was relevant to both the renter and the host, it made sense to move the constant to the modules package. The constant is currently based off of the TransactionSetSizeLimit. As scalability improves on the network, it might make sense to reduce this number substantially. While there is a weak connection between the two, there is no inherent reason that the host should be limiting incoming transactions based on the TransactionSetSizeLimit (other than having it as an upper bound), and therefore a separate constant is used. An extra buffer of 1kb is allowed because the transaction set is going to be expanded during negotiation when details are added and the signatures are added. A sanity check has also been added, because it will never make sense for the MaxFileContractSetLen to be larger than the transaction pool limit.
Showing with 30 additions and 3 deletions