
249 U.S. 134 (1919)
ARKADELPHIA MILLING COMPANY
v.
ST. LOUIS SOUTHWESTERN RAILWAY COMPANY ET AL.
HASTY ET AL., COMPOSING THE PARTNERSHIP OF J.F. HASTY & SONS,
v.
ST. LOUIS SOUTHWESTERN RAILWAY COMPANY ET AL.
ST. LOUIS, IRON MOUNTAIN & SOUTHERN RAILWAY COMPANY ET AL.
v.
SOUTHERN COTTON OIL COMPANY.
ST. LOUIS SOUTHWESTERN RAILWAY COMPANY ET AL.
v.
SOUTHERN COTTON OIL COMPANY.
Nos. 92, 93, 94, 95.
Supreme Court of United States.
Submitted December 17, 1918.
Decided March 3, 1919.
APPEALS FROM THE DISTRICT COURT OF THE UNITED STATES FOR THE EASTERN DISTRICT OF ARKANSAS.
*136 Mr. W.E. Hemingway, Mr. G.B. Rose, Mr. D.H. Cantrell and Mr. J.F. Loughborough for appellants in Nos. 92 and 93, and appellee in Nos. 94 and 95.
Mr. John M. Moore and Mr. George A. McConnell for appellees in Nos. 92 and 93, and appellants in Nos. 94 and 95.
MR. JUSTICE PITNEY delivered the opinion of the court.
These four cases were consolidated for the purposes of the hearing in the District Court, and have been treated as consolidated for the purposes of the hearing on appeal. They are so closely related that they may be dealt with in a single opinion.
*137 On July 18, 1908, the two railway companies concerned  the St. Louis, Iron Mountain & Southern, which for brevity may be called the Iron Mountain, and the St. Louis Southwestern, which may be called the Southwestern  brought separate suits in equity in the Circuit Court (now the District Court) of the United States for the Eastern District of Arkansas against the members of the State Railroad Commission in their official capacity, and against two citizens of that State named as frequent shippers of freight upon the railroad lines, for injunctions to restrain the enforcement of certain intrastate freight and passenger rates; setting up that the commission was duly organized under an act of the legislature, and was thereby authorized to fix rates to be charged by the railroads in the State of Arkansas for the transportation of freight and passengers in that State; that the commission had officially adopted a tariff of freight rates applying to all classes and commodities of freight on all railroads operated in the State, and had ordered it to take effect on June 15, 1908; that the rates were unreasonable, unjust, discriminatory, confiscatory, and void; that they did not yield an adequate return for the services rendered; and that the operation of said tariff would deprive complainants of their property without due process of law and deny to them the equal protection of the laws, in violation of § 1 of the Fourteenth Amendment to the Constitution of the United States. It was further alleged that the rates for the transportation of passengers in the State fixed by an act of the legislature passed February 9, 1907, and promulgated by order of the railroad commissioners, were confiscatory and void in their effect upon the complainant railways and, therefore, violative of the Fourteenth Amendment; but the passenger rates are not involved in the present appeals, and need not be further mentioned.
The jurisdiction of the federal court depended solely *138 upon the ground that the cases arose under the Constitution of the United States, and that the matter in controversy in each case exceeded the jurisdictional amount.
Temporary injunctions were issued in September, 1908, and continued in force during the pendency of the suits. The circuit court upon granting them ordered in each case that the complainant should execute a bond in the penal sum of $200,000, conditioned that complainant should keep a correct account respecting its carriage of passengers and freight, showing the difference between the tariff actually charged and that which would have been charged had the rate inhibited been applied, also showing the particulars of the carriage, and the names of the persons affected as far as practicable, the record to be kept subject to the further order of the court; and further conditioned that if it should eventually be decided that so much of the order as inhibited the enforcement of the rates ought not to have been made, the complainant should within a reasonable time to be fixed by the court refund in every instance to the party entitled the excess in charge over what would have been charged had the inhibited rates been applied, together with lawful interest and damages. Complainants entered into such bonds with sureties. Later an additional injunction bond was required to be and was furnished by each complainant, but without sureties, conditioned substantially as above.
Full answers having been filed by the railroad commission, and testimony having been taken, the cases were brought on to final hearing, and on May 11, 1911, final decrees were made, the same in both cases. They enjoined the commissioners and their successors, the individual shippers named as defendants, and all other patrons of the road in the shipment of freight between stations in the State of Arkansas, from enforcing or attempting to enforce any of the provisions of the freight tariff in question. In addition to this, and after disposing *139 of the question of costs, each decree ordered that the bond for injunction be released and the sureties thereon discharged from liability, and concluded as follows: "And the court reserves and retains unto itself jurisdiction of the subject matter of this suit and of all parties hereto, to the end that such other and further orders and decrees may be made herein as may become necessary by reason of any changed conditions as to the facts, equities or rights that may hereafter take place or arise."
The railroad commissioners appealed to this court (the defendant shippers having been severed), the cases were heard together, and the decrees of the circuit court were reversed June 16, 1913, with directions to dismiss the bills without prejudice. Allen v. St. Louis, Iron Mountain & Southern Ry. Co., 230 U.S. 553. The causes were remanded to the district court, the mandate in each case reciting the reversal and the order remanding the cause with directions to dismiss the bill without prejudice, and concluding as follows. "You, therefore, are hereby commanded that such execution and further proceedings be had in said cause, in conformity with the opinion and decree of this Court, as according to right and justice, and the laws of the United States, ought to be had, the said appeal notwithstanding."
Upon the going down of the mandates the district court on July 18, 1913, entered decrees in obedience thereto dismissing the bills without prejudice and dissolving the injunctions; and at the same time and as a part of the same decrees made a reference under a rule of the court to a special master for the purpose of determining the damages alleged to have been sustained by the railroad commissioners by reason of the granting of the temporary and permanent injunctions, declaring: "That in determining these damages, for the recovery of which the said commissioners are not acting for themselves but for the benefit of all persons, shippers, consignees and passengers, who *140 have sustained any damages by reason of the granting of said injunctions," the master was authorized to examine witnesses and to give notice by publication that all persons having claims against the complainants by reason of the granting of the injunctions should present them within a time specified for the purpose.
Under this reference the appellants in cases Nos. 92 and 93 and the appellee in Nos. 94 and 95 intervened and presented claims for a refund of the difference paid by them in freight rates between the rates prescribed by the commission and those put in force by the railway companies. The master reported favorably upon these claims, dividing the amounts allowed into three periods, the first and second of which included the time elapsed between September 3, 1908, when the interlocutory injunctions were issued, and May 11, 1911, the date of the final decrees, and the third period included the time elapsed between the latter date and July 18, 1913, the date of the decrees entered upon the mandates. The railway companies filed exceptions to the master's report, which were sustained by the district court as to the claims involved in cases Nos. 92 and 93 and overruled as to those involved in Nos. 94 and 95, and a combined decree was made accordingly.
The parties aggrieved desiring to appeal, and being in doubt whether the appeal lay to this court or to the circuit court of appeals, prayed for and were allowed appeals to both courts. Hence the first question that confronts us is whether the decree is the subject of a direct appeal to this court.
We are clear that this question must be answered in the affirmative. The appeals from the final decrees in the main causes were brought direct to this court, because of the constitutional question, under § 5 of the Circuit Court of Appeals Act of March 3, 1891, c. 517, 26 Stat. 827, which provided for such an appeal in the following *141 cases, among others: "In any case that involves the construction or application of the Constitution of the United States. . . . In any case in which the constitution or law of a State is claimed to be in contravention of the Constitution of the United States." This section, of course, was the predecessor of § 238, Judicial Code, under which the present appeals were taken. And it is plain that the orders of the railroad commission were state laws within the meaning of this provision. Williams v. Bruffy, 96 U.S. 176, 183; Atlantic Coast Line R.R. Co. v. Goldsboro, 232 U.S. 548, 555.
The provisions of the Judicial Code which regulate the jurisdiction of the circuit court of appeals originated in § 6 of the Act of 1891. They must be construed together with those provisions of law that confer upon the district court (§ 24, Judicial Code), and formerly conferred upon the circuit court, original jurisdiction in suits of a civil nature arising under the Constitution or laws of the United States, and in suits between citizens of different States. By § 128 of the Code, the circuit courts of appeals are to exercise appellate jurisdiction over the final decisions of the district courts "in all cases other than those in which appeals and writs of error may be taken direct to the Supreme Court, as provided in section two hundred and thirty-eight, unless otherwise provided by law; and, except as provided in sections two hundred and thirty-nine and two hundred and forty, the judgments and decrees of the circuit courts of appeals shall be final in all cases in which the jurisdiction is dependent entirely" upon diversity of citizenship. Section 239 provides for the certification of questions by the circuit court of appeals to this court; § 240 permits this court to review by certiorari any case in which the judgment or decree of the circuit court of appeals is made final; and, by § 241, in any case in which the judgment or decree of that court is not made final, there may be an appeal or writ of error *142 to this court where the matter in controversy exceeds one thousand dollars besides costs.
The present appeals relate to a decree made in a subordinate action ancillary to the main causes, in which, as has been stated, the federal jurisdiction was invoked solely upon the ground that the cases arose under the Constitution of the United States. It has been held repeatedly that jurisdiction of subordinate actions is to be attributed to the jurisdiction upon which the main suit rested, and hence that where jurisdiction of the main cause is predicated solely on diversity of citizenship and the decree therein is for this reason made final in the circuit court of appeals, the judgments and decrees in the ancillary litigation also are final. Rouse v. Letcher, 156 U.S. 47; Gregory v. Van Ee, 160 U.S. 643; Rouse v. Hornsby, 161 U.S. 588; Pope v. Louisville, &c., Ry. Co., 173 U.S. 573, 577.
The proceeding out of which the decree now in question arose was not merely ancillary but was in effect a part of the main causes, taken for the purpose of carrying into effect the decrees of this court reversing the final decrees in the main causes and, at the same time, for the purpose of giving effect to a reservation of jurisdiction by the court below as contained in those final decrees. The supplementary decree that is now before us, since it simply brings to a conclusion those former suits pursuant to our decrees therein, must be treated as involving the construction and application of the Constitution of the United States and as being made in a case in which a state law was claimed to be in contravention of the Federal Constitution, within the meaning of § 238, Judicial Code.
Therefore the motions to dismiss must be denied.
Upon the merits, it will be convenient to take up first the case of the Southern Cotton Oil Company, appellee in Nos. 94 and 95, in whose favor claims were allowed by *143 the master as against each of the two railways and for each of the periods referred to. The railways excepted upon two grounds: (1) because the final decrees of May 11, 1911, discharging the injunction bonds and releasing the makers thereof from liability had the effect to relieve the railways and their sureties from all liability by reason of the granting of the injunctions; and (2) as to such claims for overcharges as accrued subsequent to the date of the final decrees, on the ground that upon the rendition of those decrees the injunction bonds ceased to be operative and created no further liability, and that the railways incurred no liability to the claimants under the final decrees. The district court overruled the exceptions and sustained the claims of the Oil Company as against the railway companies and the sureties with interest at 6 per cent. per annum from the respective dates that the overcharges were made.
We deal first with so much of the overcharges as accrued prior to the final decrees. In St. Louis, Iron Mountain & Southern Ry. Co. v. McKnight, 244 U.S. 368, 373, doubt was expressed whether, in view of the form of the mandate, there was any power in the district court to determine the liability of the railway companies upon the bonds. But at that time our attention was not called to the fact that the mandates contained a provision authorizing further proceedings; a provision that removes all question of the power of the district court. In re Louisville, 231 U.S. 639, 645; Louisville v. Cumberland Telephone Co., 231 U.S. 652.
In support of the contention that the final decrees had the effect of discharging the complainants and their sureties from liability upon the bonds by reason of previous overcharges, it is pointed out that this part of the decrees was not appealed from nor was error assigned to the court's action in vacating the bonds and releasing the sureties. Whether, under the circumstances, the *144 action of this court in reversing the decrees in respect of their main provisions granting permanent injunctions had the effect of reversing also that portion which discharged the liability upon the injunction bonds is a question upon which we need not pass. For, irrespective of this, those clauses of the final decrees by which the district court retained jurisdiction for the purpose of making such further orders and decrees as might become necessary, coupled with the subsequent mandates of this court permitting further proceedings to be taken in conformity with our opinion and decrees and according to right and justice, empowered the district court to set aside so much of its final decrees as released the railways and their sureties from liabilities theretofore incurred under the injunction bonds. This is what the district court in effect did when it ordered the reference and sustained the claims of the Oil Company so far as they accrued prior to the final decrees.
It is argued that the condition of the bonds  that if it should eventually be decided that the order inhibiting the enforcement of the commission rates should not have been made the complainant should refund, etc.  never was broken because it was not at any time adjudged that the allowance of the temporary injunctions was improper. But this is to construe the bonds according to the letter and not according to the substance. The state statute and the orders of the railroad commission entitled shippers to the benefit of the rates thereby established; and they were thus entitled at all times except as it became necessary to stay the operation of the rates by equitable process in order to permit of a judicial investigation into the question of their adequacy. The burden of proof to show them inadequate was upon the railway companies; and when they failed to sustain this burden they at the same time showed that the injunctions ought not to have been allowed.
*145 As to that portion of the claims which accrued after the final decrees, this, as we already have held in the McKnight Case, 244 U.S. 368, 374, was not recoverable upon the injunction bonds, nor against the sureties therein. On a fair construction of the conditions of those instruments, their obligation expired by limitation when the suits were brought to a final conclusion. Hence, to the extent that the supplemental decree now under review awards a recovery against the sureties for claims accruing after the final decrees, it must be modified.
But, in our opinion, this portion of the claims is allowable against the railway companies themselves upon the principle, long established and of general application, that a party against whom an erroneous judgment or decree has been carried into effect is entitled, in the event of a reversal, to be restored by his adversary to that which he has lost thereby. This right, so well founded in equity, has been recognized in the practice of the courts of common law from an early period. Where plaintiff had judgment and execution and defendant afterwards sued out a writ of error, it was regularly a part of a judgment of reversal that the plaintiff in error "be restored to all things which he hath lost by occasion of the said judgment"; and thereupon, in a plain case, a writ of restitution issued at once; but if a question of fact was in doubt, a writ of scire facias was first issued. Anonymous, Salk. 588; citing Goodyere v. Ince, Cro. Jac. 246; Sympson v. Juxon, Cro. Jac. 698; Vesey v. Harris, Cro. Car. 328; see also Lil. Ent. 641, 650; Arch. Append. 195, 200. The doctrine has been most fully recognized in the decisions of this court. Bank of the United States v. Bank of Washington, 6 Pet. 8, 17; Erwin v. Lowry, 7 How. 172, 184; Northwestern Fuel Co. v. Brock, 139 U.S. 216.
That a course of action so clearly consistent with the principles of equity is one proper to be adopted in an equitable proceeding goes without saying. It is one of the *146 equitable powers, inherent in every court of justice so long as it retains control of the subject-matter and of the parties, to correct that which has been wrongfully done by virtue of its process. Northwestern Fuel Co. v. Brock, 139 U.S. 216, 219; Johnston v. Bowers, 69 N.J.L. 544, 547.
It is argued that the claimant is not in a position to invoke the principle of restitution in this proceeding because it was not a party to the original proceedings, but came in by intervening before the master. This point is unsubstantial. The railroad commission, in defending the rate schedules against the attack of the railway companies, represented all shippers; the permanent injunctions that were awarded by the final decrees restrained all shippers from taking advantage of the commission rates; and during the time that those decrees remained unreversed the railway companies obtained the benefit of the injunction by exacting from this claimant, among others, in addition to the commission rates, those excess charges that form the basis of the present claims. It is a typical case for the application of the principle of restitution; and the district court properly held the commission to be the representative of the shippers for this purpose.
The suggestion that the order of reference was made under a rule of court that related only to damages recoverable on injunction bonds, and furnished no foundation for a decree against the railways on the theory of restitution, is without weight. The companies were fully heard upon the merits, and there is no question about the facts.
In behalf of the railways, it is argued that the reversal of the decrees of May 11, 1911, "without prejudice," left the rights of the parties still in doubt, and thus rendered it improper for the district court to award damages against the railways, either on the basis of a breach of the injunction bonds or on the basis of restitution.
*147 But it seems to us that the rights of the present shippers were so clear as to make an allowance of damages upon the injunction bonds and restitution upon the reversal of the decrees manifestly their due. That the reversal was "without prejudice" did not deprive the decrees of conclusiveness as to past transactions, but only prevented them from being a bar to future suits for injunction upon a showing of changed conditions. Missouri v. Chicago, Burlington & Quincy R.R. Co., 241 U.S. 533, 539.
The contention that there was error in allowing interest upon the amount of the overcharges is unsubstantial. The damage was complete when the overcharges were made, and as they were wrongfully made and without consent of the shippers, interest ran from that date on general principles.
For these reasons, the decree in favor of the Southern Cotton Oil Company, modified so as to relieve the sureties from that part of the claims which accrued after the final decrees of May 11, 1911, will be affirmed.
The claims of both the Arkadelphia Milling Company (No. 92) and Hasty & Sons (No. 93) were based upon the difference between rates charged on rough lumber from the forest to milling points and the rates provided in the commission tariff on such movements. The tariff contained certain maximum rates on lumber of this character applicable generally, and in addition certain "rough material rates" much lower than the others, conditioned upon a certain percentage of the manufactured product being shipped over the same line that brought in the rough material. The railway companies excepted to the allowance in favor of each of these appellants upon the ground that the "rough material rates" were discriminatory against shippers who did not reship the specified percentages of the finished product. As to the Hasty claim, there was an additional exception based upon the *148 ground that the movement of rough material to milling points in the State and the subsequent forwarding of the finished product to market points outside of the State constituted interstate commerce, so that the rough material rates prescribed by the state commission were not applicable. The court sustained the exceptions on both grounds.
To take up first the question of discrimination: The tariff gave the benefit of the rough material rates only where the shipper transported over the line of the carrier a certain percentage of the product manufactured from the rough material. The master found that the condition was complied with by these shippers and sustained the allowances accordingly.
The district court sustained the defense of discrimination upon the authority of Lake Shore & Michigan Southern Ry. Co. v. Smith, 173 U.S. 684, and Cotting v. Kansas City Stock Yards Co., 183 U.S. 79.
We assume, without deciding, that, notwithstanding the general result adverse to the railway companies in the main suits, they were still at liberty to dispute the validity of the rate schedule as it related to particular shippers. See Chicago, Milwaukee & St. Paul Ry. Co. v. Minnesota, 134 U.S. 418, 460, concurring opinion of Mr. Justice Miller; St. Louis & San Francisco Ry. Co. v. Gill, 156 U.S. 649, 659, 666; Ex parte Young, 209 U.S. 123; Missouri v. Chicago, Burlington & Quincy R.R. Co., 241 U.S. 533, 538.
In our opinion, however, the district court erred in its ruling. The rough material rates were but parts of a general schedule that covered a wide field. This schedule was established in the exercise of the legislative authority of the State, and could not be set aside by the court on the ground of discrimination unless it amounted to a denial of the equal protection of the laws guaranteed by the Fourteenth Amendment.
*149 But there is nothing to show that the rough material rates wrought any discrimination against the railway companies. They were applicable upon all railways alike. If there was  not in the least intimating that there was  undue discrimination as against small shippers or those who had no occasion to obtain transportation for the manufactured product over the line of the same carrier, this was not a matter of which the railways could complain. It is most thoroughly established that before one may be heard to strike down state legislation upon the ground of its repugnancy to the Federal Constitution he must bring himself within the class affected by the unconstitutional feature. Plymouth Coal Co. v. Pennsylvania, 232 U.S. 531, 544; Jeffrey Mfg. Co. v. Blagg, 235 U.S. 571, 576; Mallinckrodt Works v. St. Louis, 238 U.S. 41, 54; Cusack Co. v. Chicago, 242 U.S. 526, 530.
Lake Shore & Michigan Southern Ry. Co. v. Smith, 173 U.S. 684, did not set aside this established principle. The discrimination in favor of certain patrons, there referred to, was laid hold of rather as showing the unreasonable character of the regulation. The authority of that case is not to be extended. Louisville & Nashville R.R. Co. v. Kentucky, 183 U.S. 503, 511; Pennsylvania R.R. Co. v. Towers, 245 U.S. 6.
Cotting v. Kansas City Stock Yards Co., 183 U.S. 79, is not at all in point. While the opinion of Mr. Justice Brewer covers a wide range of discussion, a majority of the court (p. 114) placed the decision upon the ground that the statute of Kansas applied only to a single company, and not to others engaged in like business in the State, and thereby denied to that company the equal protection of the laws.
There remains the question whether the shipments by J.F. Hasty & Sons of rough material from the forest to the milling point, followed by the forwarding of the finished product to points outside of the State, constituted interstate *150 commerce. If they did, it is obvious that the state tariff was not applicable to them.
The following statement, taken from the record, shows the admitted facts as to the course of business:
"When the rough material reached the mills, it was manufactured into finished staves, headings and hoops, and in this condition shipped to whoever purchased them. The purchaser uses them in making barrels, casks, etc. The wastings in the finishing of said articles from the rough material were either disposed of for firewood, or destroyed. When the rough material left the woods, a bill of lading was issued from the woods to the mill. When the rough material reached the mill, it was finished into some or all of the articles described, when it was stacked in the yards or placed in kilns to dry. The process of manufacturing and drying occupied several months, or on an average this process would be gone through with, the finished products sold and shipped to the purchaser, in about five months from the date the rough material was received at the mill. The claimants classified the different parts after they came from the mill completely finished, and made sales from such stock. The markets for the manufactured articles were almost altogether in other states than Arkansas, or in foreign countries, and about ninety-five per cent. of the sale of finished articles, that is, of the total outbound shipments, were made for delivery at points outside the State of Arkansas, the remaining five per cent. being sold and delivered, or shipped to points within the State of Arkansas. At the time the rough material was shipped to the mills, the mills did not know to whom they would sell the finished product, or to what points it would be shipped, but did know that there was little market for the finished articles in the State of Arkansas, and expected that they would sell ninety-five per cent. of said finished articles and ship them to points outside the State of Arkansas.
*151 "It was the intention of all the claimants herein, at the time they shipped the rough material into the milling points, to mill said rough material with the object of selling the said finished product and shipping it out as soon as practicable, and all of them knew and intended at the time they brought the rough material into the mill, on account of previous course of dealings in the business, that ninety-five per cent. of the finished product would be by them shipped to points outside the State of Arkansas.
"The claimants paid the usual property tax to the State of Arkansas on their stock of materials on hand at the milling point, whether said stock was in the rough or finished, the amount of the tax being arrived at according to the methods in use in the State of Arkansas by the use of an average basis."
Upon the facts as stated, it is our opinion that the district court erred in treating the movement of the rough lumber from the woods to the milling point as interstate commerce. It is not merely that there was no continuous movement from the forest to the points without the State, but that when the rough material left the woods it was not intended that it should be transported out of the State, or elsewhere beyond the mill, until it had been subjected to a manufacturing process that materially changed its character, utility, and value. The raw material came to rest at the mill, and after the product was manufactured it remained stored there for an indefinite period  manufacture and storage occupying five months on the average  for the purpose of finding a market. Where it would eventually be sold no one knew. And the fact that previous experience indicated that 95 per cent. of it must be marketed outside of the State, so that this entered into the purpose of the parties when shipping the rough material to the mill, did not alter the character of the latter movement. The question is too well settled by *152 previous decisions to require discussion. Coe v. Errol, 116 U.S. 517, 525; Bacon v. Illinois, 227 U.S. 504, 515-516; McCluskey v. Marysville & Northern Ry. Co., 243 U.S. 36.
The distinction between these cases and those cited to sustain the decision of the district court (Swift & Co. v. United States, 196 U.S. 375, 398; Ohio R.R. Commission v. Worthington, 225 U.S. 101; Texas & New Orleans R.R. Co. v. Sabine Tram Co., 227 U.S. 111; Louisiana R.R. Commission v. Texas & Pacific Ry. Co., 229 U.S. 336) is so evident that particular analysis may be dispensed with.
The exceptions sustained by the district court to the claims of the Arkadelphia Milling Co. and Hasty & Sons having been found to be untenable, it results that these claims should be allowed as against the railway companies and their sureties, so far as they arose before the final decrees, and as against the railway companies only, so far as they arose after the final decrees.
Nos. 92 and 93, decree reversed; Nos. 94 and 95, decree modified and affirmed; and the cause remanded for further proceedings in conformity with this opinion.
