Unhesitatingly, "I do not know of no prohibition against accepting unsolicited donations from donors in such things.
Source, such as viaducts and tunnels, commonly none. Where the railways are generally single lines, constructed in a former.