The proceeds of sale made under and by virtue of this chapter shall be paid at once to the district treasurer and shall be accounted for by him the same as the drainage taxes. Any surplus that may remain after payment of the delinquent taxes, penalties, costs and attorney fees shall be paid over to or held subject to the order of the defendants or as may be ordered in the judgment or decree of sale.