github.com/NebulousLabs/Sia@v1.3.7/modules/host_test.go (about) 1 package modules 2 3 import ( 4 "testing" 5 ) 6 7 // TestUnitMaxFileContractSetLenSanity checks that a sensible value for 8 // MaxFileContractSetLen has been chosen. 9 func TestUnitMaxFileContractSetLenSanity(t *testing.T) { 10 t.Parallel() 11 12 // It does not make sense for the contract set limit to be higher than the 13 // IsStandard limit in the transaction pool. Such a transaction set would 14 // never be accepted by the transaction pool, and therefore is going to 15 // cause a failure later on in the host process. An extra 1kb is left 16 // because the file contract transaction is going to grow as the terms are 17 // negotiated and as signatures are added. 18 if NegotiateMaxFileContractSetLen > TransactionSetSizeLimit-1e3 { 19 t.Fatal("MaxfileContractSetLen does not have a sensible value - should be smaller than the TransactionSetSizeLimit") 20 } 21 22 }