The act of congress, approved the 29th July, 1850, entitled an act to provide for recording the conveyances of vessels and for other purposes, enacts that no bill of sale, mortgage, hypothecation or conveyance of any vessel, or part of any vessel of the United States, shall be valid against any person, other than the grantor or mortgagor, his heirs and devisees, and persons having actual notice thereof, unless such, bill of sale, mortgage, hypothecation or conveyance be recorded in the office of the collector of the customs, where such vessel is registered or enrolled.